package interfaceGrafica;

import baseDeDatos.GestorBD;
import criterios.CriterioAbstracto;
import criterios.CriterioAnciano;
import criterios.CriterioEmbarazadas;
import criterios.CriterioEnfermedad;
import criterios.CriterioNinios;
import datosFamilias.Familia;
import datosFamilias.Persona;
import java.awt.event.MouseEvent;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JScrollPane;
import javax.swing.JTable;
import javax.swing.JTextArea;
import javax.swing.ListSelectionModel;
import javax.swing.ScrollPaneConstants;
import javax.swing.border.EtchedBorder;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;
import principal.Valoracion;
import tecnicas.AHP;
import tecnicas.ArrowRaynaudMejorado;
import tecnicas.Heuristica;

public class Grafica extends javax.swing.JFrame {

    private int cantidadCrit = 1;
    private int tecnica1;
    private int tecnica2;
    private static final int MAXCRITERIOS = 4;
    private static final int CANTIDAD_GRADOS = 4;
    private static final int HEURISTICA = 1;
    private static final int AHP = 2;
    private static final int ARROW = 3;
    private Hashtable botones = new Hashtable();
    private ArrayList<String> criterios;
    private ArrayList<String> critCombos;
    private ArrayList matriz;
    private ArrayList tecnicas;
    private ArrayList confCrit;
    private ArrayList<Familia> familiasResultados1; 
    private ArrayList<Familia> familiasResultados2; 
    private CriterioAbstracto crit = null;
    
    private principal.Valoracion valoracion = new principal.Valoracion();
    private GestorBD gestorBD;
    private ArrayList<Familia> familias = null;
    
    private DefaultTableModel tabla1;
    private DefaultTableModel tabla2;
    private ListSelectionModel seleccion;

    /* Inicializa la grafica. Pone las tablas a 0. Guarda objects en hash.
       oculta botones. */
    public Grafica() {
        initComponents();
        cargarCombosValores();
        setearCombosValores();
        tabla1 = (DefaultTableModel) tablaRanking1.getModel();
        tabla2 = (DefaultTableModel) tablaRanking2.getModel();
        tabla1.setNumRows(0);
        tabla2.setNumRows(0);
        guardarBotonesEnHash();
        ocultarBotonesCriterios();
        inicConfCrit();
        calcularRanking.setEnabled(false);
        nuevaBusqueda.setEnabled(false);
        jPanel9.setBorder(new TitledBorder ( new EtchedBorder (), "Datos Familia" ));
        actualizarCombo(cantidadCrit);
        changeCheckBoxOptions(true, "ccn");
        changeCheckBoxOptions(true, "cce");
        changeCheckBoxOptions(true, "ccd");
        changeCheckBoxOptions(true, "ccem");
        jButton2.setEnabled(false);
    }
    
    private void setearCombosValores(){
        //setea valores niños
        comboConfCritNinio1.setSelectedItem(Valoracion.getValoracion("bebe"));
        comboConfCritNinio2.setSelectedItem(Valoracion.getValoracion("infante"));
        comboConfCritNinio3.setSelectedItem(Valoracion.getValoracion("ninio"));
        //setea valores ancianos
        comboConfCritAnciano1.setSelectedItem(Valoracion.getValoracion("anciano"));
        //setea valores enfermos
        comboConfCritEnf1.setSelectedItem(Valoracion.getValoracion("Bazo (no crónica)"));
        comboConfCritEnf2.setSelectedItem(Valoracion.getValoracion("Bazo"));
        comboConfCritEnf3.setSelectedItem(Valoracion.getValoracion("Celiaquía"));
        comboConfCritEnf4.setSelectedItem(Valoracion.getValoracion("Cerebrales / neurológicas"));
        comboConfCritEnf5.setSelectedItem(Valoracion.getValoracion("Circulatoria / coronaria"));
        comboConfCritEnf6.setSelectedItem(Valoracion.getValoracion("Colesterol / triglicéridos"));
        comboConfCritEnf7.setSelectedItem(Valoracion.getValoracion("Desnutrición"));
        comboConfCritEnf8.setSelectedItem(Valoracion.getValoracion("Diabetes"));
        comboConfCritEnf9.setSelectedItem(Valoracion.getValoracion("Diarreas crónicas"));
        comboConfCritEnf10.setSelectedItem(Valoracion.getValoracion("Digestivas"));
        comboConfCritEnf11.setSelectedItem(Valoracion.getValoracion("Enfermedades renales"));
        comboConfCritEnf12.setSelectedItem(Valoracion.getValoracion("Epilepsia"));
        comboConfCritEnf13.setSelectedItem(Valoracion.getValoracion("Glandulares"));
        comboConfCritEnf14.setSelectedItem(Valoracion.getValoracion("Gota"));
        comboConfCritEnf15.setSelectedItem(Valoracion.getValoracion("Hepatitis"));
        comboConfCritEnf16.setSelectedItem(Valoracion.getValoracion("Hipertensión"));
        comboConfCritEnf17.setSelectedItem(Valoracion.getValoracion("HIV"));
        comboConfCritEnf18.setSelectedItem(Valoracion.getValoracion("Sífilis"));
        comboConfCritEnf19.setSelectedItem(Valoracion.getValoracion("Tumores"));
        comboConfCritEnf20.setSelectedItem(Valoracion.getValoracion("Visuales"));
        comboConfCritEnf21.setSelectedItem(Valoracion.getValoracion("Auditivas"));
        comboConfCritEnf22.setSelectedItem(Valoracion.getValoracion("Fobias"));
        comboConfCritEnf23.setSelectedItem(Valoracion.getValoracion("Alergias"));
        comboConfCritEnf24.setSelectedItem(Valoracion.getValoracion("Otras"));
        //setea valores discapacidades
        comboConfCritDis1.setSelectedItem(Valoracion.getValoracion("Leve (menos del 10%)"));
        comboConfCritDis2.setSelectedItem(Valoracion.getValoracion("Media ( del 10% al 60%)"));
        comboConfCritDis3.setSelectedItem(Valoracion.getValoracion("Grave ( superior al 60%)"));
        comboConfCritDis4.setSelectedItem(Valoracion.getValoracion("Neurológica"));
        comboConfCritDis5.setSelectedItem(Valoracion.getValoracion("Motora"));
        comboConfCritDis6.setSelectedItem(Valoracion.getValoracion("Física"));
        comboConfCritDis7.setSelectedItem(Valoracion.getValoracion("Psiquiátrica"));
        //setea valores embarazadas
        comboConfCritEmb1.setSelectedItem(Valoracion.getValoracion("NORMAL"));
        comboConfCritEmb2.setSelectedItem(Valoracion.getValoracion("COMPLICADO"));
    }
    
    //desde aca se le da el rago de valores que puede tomar cada elemento del criterio
    private void cargarCombosValores(){
        for (int j=1; j<11; j++){
            //cargo valores niños
            comboConfCritNinio1.addItem(j);
            comboConfCritNinio2.addItem(j);
            comboConfCritNinio3.addItem(j);
            //cargo valores ancianos
            comboConfCritAnciano1.addItem(j);
            //cargo valores enfermos
            comboConfCritEnf1.addItem(j);
            comboConfCritEnf2.addItem(j);
            comboConfCritEnf3.addItem(j);
            comboConfCritEnf4.addItem(j);
            comboConfCritEnf5.addItem(j);
            comboConfCritEnf6.addItem(j);
            comboConfCritEnf7.addItem(j);
            comboConfCritEnf8.addItem(j);
            comboConfCritEnf9.addItem(j);
            comboConfCritEnf10.addItem(j);
            comboConfCritEnf11.addItem(j);
            comboConfCritEnf12.addItem(j);
            comboConfCritEnf13.addItem(j);
            comboConfCritEnf14.addItem(j);
            comboConfCritEnf15.addItem(j);
            comboConfCritEnf16.addItem(j);
            comboConfCritEnf17.addItem(j);
            comboConfCritEnf18.addItem(j);
            comboConfCritEnf19.addItem(j);
            comboConfCritEnf20.addItem(j);
            comboConfCritEnf21.addItem(j);
            comboConfCritEnf22.addItem(j);
            comboConfCritEnf23.addItem(j);
            comboConfCritEnf24.addItem(j);
            //cargo valores discapacidad
            comboConfCritDis1.addItem(j);
            comboConfCritDis2.addItem(j);
            comboConfCritDis3.addItem(j);
            comboConfCritDis4.addItem(j);
            comboConfCritDis5.addItem(j);
            comboConfCritDis6.addItem(j);
            comboConfCritDis7.addItem(j);
            //cargo valores embarazadas
            comboConfCritEmb1.addItem(j);
            comboConfCritEmb2.addItem(j);             
        }
    }
    
    //habilita los botones que sirven para calcular el segundo ranking
    private void habilitarInterfazMetodos(){
        jLabel4.setEnabled(true);
        radioHeuristica2.setEnabled(true);
        radioAHP2.setEnabled(true);
        radioOtro2.setEnabled(true);
    }
    
    //guarda los botones necesarios de la grafica para la funcionalidad en la hash
    private void guardarBotonesEnHash(){
        botones.put("lc2", labelCriterio2);
        botones.put("lc3", labelCriterio3);
        botones.put("lc4", labelCriterio4);
        botones.put("lc5", labelCriterio5);
        botones.put("lc21", labelCriterio21);
        botones.put("lc31", labelCriterio31);
        botones.put("lc32", labelCriterio32);
        botones.put("lc41", labelCriterio41);
        botones.put("lc42", labelCriterio42);
        botones.put("lc43", labelCriterio43);
        botones.put("lc51", labelCriterio51);
        botones.put("lc52", labelCriterio52);
        botones.put("lc53", labelCriterio53);
        botones.put("lc54", labelCriterio54);
        botones.put("cc1", comboCriterio1);
        botones.put("cc2", comboCriterio2);
        botones.put("cc3", comboCriterio3);
        botones.put("cc4", comboCriterio4);
        botones.put("cc5", comboCriterio5);
        botones.put("cv21", comboValor21);
        botones.put("cv31", comboValor31);
        botones.put("cv32", comboValor32);
        botones.put("cv41", comboValor41);
        botones.put("cv42", comboValor42);
        botones.put("cv43", comboValor43);
        botones.put("cv51", comboValor51);
        botones.put("cv52", comboValor52);
        botones.put("cv53", comboValor53);
        botones.put("cv54", comboValor54);
        botones.put("eliminarCriterio",botonEliminarCriterio);
        //ninios
        botones.put("cccn1", comboConfCritNinio1);
        botones.put("cccn2", comboConfCritNinio2);
        botones.put("cccn3", comboConfCritNinio3);
        botones.put("ccn1", checkCritNinio1);
        botones.put("ccn2", checkCritNinio2);
        botones.put("ccn3", checkCritNinio3);
        //enfermos
        botones.put("ccce1", comboConfCritEnf1);
        botones.put("ccce2", comboConfCritEnf2);
        botones.put("ccce3", comboConfCritEnf3);
        botones.put("ccce4", comboConfCritEnf4);
        botones.put("ccce5", comboConfCritEnf5);
        botones.put("ccce6", comboConfCritEnf6);
        botones.put("ccce7", comboConfCritEnf7);
        botones.put("ccce8", comboConfCritEnf8);
        botones.put("ccce9", comboConfCritEnf9);
        botones.put("ccce10", comboConfCritEnf10);
        botones.put("ccce11", comboConfCritEnf11);
        botones.put("ccce12", comboConfCritEnf12);
        botones.put("ccce13", comboConfCritEnf13);
        botones.put("ccce14", comboConfCritEnf14);
        botones.put("ccce15", comboConfCritEnf15);
        botones.put("ccce16", comboConfCritEnf16);
        botones.put("ccce17", comboConfCritEnf17);
        botones.put("ccce18", comboConfCritEnf18);
        botones.put("ccce19", comboConfCritEnf19);
        botones.put("ccce20", comboConfCritEnf20);
        botones.put("ccce21", comboConfCritEnf21);
        botones.put("ccce22", comboConfCritEnf22);
        botones.put("ccce23", comboConfCritEnf23);
        botones.put("ccce24", comboConfCritEnf24);
        botones.put("cce1", checkCritEnf1);
        botones.put("cce2", checkCritEnf2);
        botones.put("cce3", checkCritEnf3);
        botones.put("cce4", checkCritEnf4);
        botones.put("cce5", checkCritEnf5);
        botones.put("cce6", checkCritEnf6);
        botones.put("cce7", checkCritEnf7);
        botones.put("cce8", checkCritEnf8);
        botones.put("cce9", checkCritEnf9);
        botones.put("cce10", checkCritEnf10);
        botones.put("cce11", checkCritEnf11);
        botones.put("cce12", checkCritEnf12);
        botones.put("cce13", checkCritEnf13);
        botones.put("cce14", checkCritEnf14);
        botones.put("cce15", checkCritEnf15);
        botones.put("cce16", checkCritEnf16);
        botones.put("cce17", checkCritEnf17);
        botones.put("cce18", checkCritEnf18);
        botones.put("cce19", checkCritEnf19);
        botones.put("cce20", checkCritEnf20);
        botones.put("cce21", checkCritEnf21);
        botones.put("cce22", checkCritEnf22);
        botones.put("cce23", checkCritEnf23);
        botones.put("cce24", checkCritEnf24);
        //discapacidades
        botones.put("ccd1", checkCritDis1);
        botones.put("ccd2", checkCritDis2);
        botones.put("ccd3", checkCritDis3);
        botones.put("ccd4", checkCritDis4);
        botones.put("ccd5", checkCritDis5);
        botones.put("ccd6", checkCritDis6);
        botones.put("ccd7", checkCritDis7);
        botones.put("ccd8", checkCritDis8);
        botones.put("ccd9", checkCritDis9);
        botones.put("ccd10", checkCritDis10);
        botones.put("ccd11", checkCritDis11);
        botones.put("ccd12", checkCritDis12);
        
        botones.put("cccd1", comboConfCritDis1);
        botones.put("cccd2", comboConfCritDis2);
        botones.put("cccd3", comboConfCritDis3);
        botones.put("cccd4", comboConfCritDis4);
        botones.put("cccd5", comboConfCritDis5);
        botones.put("cccd6", comboConfCritDis6);
        botones.put("cccd7", comboConfCritDis7);
        //embarazadas
        botones.put("ccem1", checkCritEmb1);
        botones.put("ccem2", checkCritEmb2);
        botones.put("cccem1", comboConfCritEmb1);
        botones.put("cccem2", comboConfCritEmb2);
    }
    
    //oculta los botones de la configuracion de criterios
    private void inicConfCrit(){
        botonNuevaConfCrit.setEnabled(false);
        labelConfCrit1.setEnabled(false);
        labelConfCritNinio1.setEnabled(false);
        labelConfCritNinio2.setEnabled(false);
        labelConfCritNinio3.setEnabled(false);
        labelConfCritNinio4.setEnabled(false);
        labelConfCritNinio5.setEnabled(false);
        comboConfCritAnciano1.setEnabled(false);
        comboConfCritNinio1.setEnabled(false);
        comboConfCritNinio2.setEnabled(false);
        comboConfCritNinio3.setEnabled(false);
        checkCritNinio1.setEnabled(false);
        checkCritNinio2.setEnabled(false);
        checkCritNinio3.setEnabled(false);
        rbCritNinio1.setEnabled(false);
        rbCritNinio2.setEnabled(false);
        botonGuardarConf.setEnabled(false);
        
        //enfermos
        checkCritEnf1.setEnabled(false);
        checkCritEnf2.setEnabled(false);
        checkCritEnf3.setEnabled(false);
        checkCritEnf4.setEnabled(false);
        checkCritEnf5.setEnabled(false);
        checkCritEnf6.setEnabled(false);
        checkCritEnf7.setEnabled(false);
        checkCritEnf8.setEnabled(false);
        checkCritEnf9.setEnabled(false);
        checkCritEnf10.setEnabled(false);
        checkCritEnf11.setEnabled(false);
        checkCritEnf12.setEnabled(false);
        checkCritEnf13.setEnabled(false);
        checkCritEnf14.setEnabled(false);
        checkCritEnf15.setEnabled(false);
        checkCritEnf16.setEnabled(false);
        checkCritEnf17.setEnabled(false);
        checkCritEnf18.setEnabled(false);
        checkCritEnf19.setEnabled(false);
        checkCritEnf20.setEnabled(false);
        checkCritEnf21.setEnabled(false);
        checkCritEnf22.setEnabled(false);
        checkCritEnf23.setEnabled(false);
        checkCritEnf24.setEnabled(false);
        checkCritEnf1.setEnabled(false); 
        labelConfCritEnf1.setEnabled(false);
        labelConfCritEnf2.setEnabled(false);
        labelConfCritEnf3.setEnabled(false);
        labelConfCritEnf4.setEnabled(false);
        labelConfCritEnf5.setEnabled(false);
        labelConfCritEnf6.setEnabled(false);
        labelConfCritEnf7.setEnabled(false);
        labelConfCritEnf8.setEnabled(false);
        labelConfCritEnf9.setEnabled(false);
        labelConfCritEnf10.setEnabled(false);
        labelConfCritEnf11.setEnabled(false);
        labelConfCritEnf12.setEnabled(false);
        labelConfCritEnf13.setEnabled(false);
        labelConfCritEnf14.setEnabled(false);
        labelConfCritEnf15.setEnabled(false);
        labelConfCritEnf16.setEnabled(false);
        labelConfCritEnf17.setEnabled(false);
        labelConfCritEnf18.setEnabled(false);
        labelConfCritEnf19.setEnabled(false);
        labelConfCritEnf20.setEnabled(false);
        labelConfCritEnf21.setEnabled(false);
        labelConfCritEnf22.setEnabled(false);
        labelConfCritEnf23.setEnabled(false);
        labelConfCritEnf24.setEnabled(false);
        labelConfCritEnf25.setEnabled(false);
        labelConfCritEnf26.setEnabled(false);
        labelConfCritEnf27.setEnabled(false);
        labelConfCritEnf28.setEnabled(false);
        labelConfCritEnf29.setEnabled(false);
        labelConfCritEnf30.setEnabled(false);
        labelConfCritEnf31.setEnabled(false);
        labelConfCritEnf32.setEnabled(false);
        labelConfCritEnf33.setEnabled(false);
        labelConfCritEnf34.setEnabled(false);
        labelConfCritEnf35.setEnabled(false);
        labelConfCritEnf36.setEnabled(false);
        labelConfCritEnf37.setEnabled(false);
        labelConfCritEnf38.setEnabled(false);
        labelConfCritEnf39.setEnabled(false);
        labelConfCritEnf40.setEnabled(false);
        labelConfCritEnf41.setEnabled(false);
        labelConfCritEnf42.setEnabled(false);
        labelConfCritEnf43.setEnabled(false);
        comboConfCritEnf1.setEnabled(false);
        comboConfCritEnf2.setEnabled(false);
        comboConfCritEnf3.setEnabled(false);
        comboConfCritEnf4.setEnabled(false);
        comboConfCritEnf5.setEnabled(false);
        comboConfCritEnf6.setEnabled(false);
        comboConfCritEnf7.setEnabled(false);
        comboConfCritEnf8.setEnabled(false);
        comboConfCritEnf9.setEnabled(false);
        comboConfCritEnf10.setEnabled(false);
        comboConfCritEnf11.setEnabled(false);
        comboConfCritEnf12.setEnabled(false);
        comboConfCritEnf13.setEnabled(false);
        comboConfCritEnf14.setEnabled(false);
        comboConfCritEnf15.setEnabled(false);
        comboConfCritEnf16.setEnabled(false);
        comboConfCritEnf17.setEnabled(false);
        comboConfCritEnf18.setEnabled(false);
        comboConfCritEnf19.setEnabled(false);
        comboConfCritEnf20.setEnabled(false);
        comboConfCritEnf21.setEnabled(false);
        comboConfCritEnf22.setEnabled(false);
        comboConfCritEnf23.setEnabled(false);
        comboConfCritEnf24.setEnabled(false);
        comboConfCritDis1.setEnabled(false);
        comboConfCritDis2.setEnabled(false);
        comboConfCritDis3.setEnabled(false);
        comboConfCritDis4.setEnabled(false);
        comboConfCritDis5.setEnabled(false);
        comboConfCritDis6.setEnabled(false);
        comboConfCritDis7.setEnabled(false);
        //discapacitados
        rbCritEnf1.setEnabled(false);
        rbCritEnf2.setEnabled(false);
        checkCritDis1.setEnabled(false);
        checkCritDis2.setEnabled(false);
        checkCritDis3.setEnabled(false);
        checkCritDis4.setEnabled(false);
        checkCritDis5.setEnabled(false);
        checkCritDis6.setEnabled(false);
        checkCritDis7.setEnabled(false);
        checkCritDis8.setEnabled(false);
        checkCritDis9.setEnabled(false);
        checkCritDis10.setEnabled(false);
        checkCritDis11.setEnabled(false);
        checkCritDis12.setEnabled(false);
        
        //embarazadas
        labelConfCritEmb1.setEnabled(false);
        labelConfCritEmb2.setEnabled(false);
        labelConfCritEmb3.setEnabled(false);
        labelConfCritEmb4.setEnabled(false);
        checkCritEmb1.setEnabled(false);
        checkCritEmb2.setEnabled(false);
        rbCritEmb1.setEnabled(false);
        rbCritEmb2.setEnabled(false);
        comboConfCritEmb1.setEnabled(false);
        comboConfCritEmb2.setEnabled(false);  
        
        // Botones de seleccionar y deseleccionar todo
        selAllNiniosButton.setEnabled(false);
        selAllEnfermedadesButton.setEnabled(false);
        selAllEmbarazadasButton.setEnabled(false);
        selNoneNiniosButton.setEnabled(false);
        selNoneEnfermedadesButton.setEnabled(false);
        selNoneEmbarazadasButton.setEnabled(false);
    }
    
    //oculta los botones de la interfaz para agregar criterios y crear la matriz
    private void ocultarBotonesCriterios() {
        labelCriterio2.setVisible(false);
        labelCriterio3.setVisible(false);
        labelCriterio4.setVisible(false);
        labelCriterio5.setVisible(false);
        labelCriterio21.setVisible(false);
        labelCriterio31.setVisible(false);
        labelCriterio32.setVisible(false);
        labelCriterio41.setVisible(false);
        labelCriterio42.setVisible(false);
        labelCriterio43.setVisible(false);
        labelCriterio51.setVisible(false);
        labelCriterio52.setVisible(false);
        labelCriterio53.setVisible(false);
        labelCriterio54.setVisible(false);
        comboCriterio2.setVisible(false);
        comboCriterio3.setVisible(false);
        comboCriterio4.setVisible(false);
        comboCriterio5.setVisible(false);
        comboValor21.setVisible(false);
        comboValor31.setVisible(false);
        comboValor32.setVisible(false);
        comboValor41.setVisible(false);
        comboValor42.setVisible(false);
        comboValor43.setVisible(false);
        comboValor51.setVisible(false);
        comboValor52.setVisible(false);
        comboValor53.setVisible(false);
        comboValor54.setVisible(false);
        labelMensaje.setVisible(false);
        botonEliminarCriterio.setVisible(false);
    }
    
    private ArrayList getCriterios(){
        return criterios;
    }
    
    private ArrayList getMatriz(){
        return matriz;
    }
    
    private ArrayList getTecnicas(){
        return tecnicas;
    }
    
    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        buttonGroup4 = new javax.swing.ButtonGroup();
        buttonGroup5 = new javax.swing.ButtonGroup();
        buttonGroup6 = new javax.swing.ButtonGroup();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jPanel1 = new javax.swing.JPanel();
        jSeparator1 = new javax.swing.JSeparator();
        textMsjConnect = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jPanel4 = new javax.swing.JPanel();
        comboCriterio1 = new javax.swing.JComboBox();
        jLabel2 = new javax.swing.JLabel();
        botonAñadirCriterio = new javax.swing.JButton();
        comboCriterio2 = new javax.swing.JComboBox();
        comboValor21 = new javax.swing.JComboBox();
        labelMensaje = new javax.swing.JLabel();
        labelCriterio2 = new javax.swing.JLabel();
        labelCriterio3 = new javax.swing.JLabel();
        comboCriterio3 = new javax.swing.JComboBox();
        comboValor31 = new javax.swing.JComboBox();
        comboValor32 = new javax.swing.JComboBox();
        labelCriterio4 = new javax.swing.JLabel();
        comboCriterio4 = new javax.swing.JComboBox();
        comboValor41 = new javax.swing.JComboBox();
        comboValor42 = new javax.swing.JComboBox();
        comboValor43 = new javax.swing.JComboBox();
        labelCriterio5 = new javax.swing.JLabel();
        comboCriterio5 = new javax.swing.JComboBox();
        comboValor51 = new javax.swing.JComboBox();
        comboValor52 = new javax.swing.JComboBox();
        comboValor53 = new javax.swing.JComboBox();
        comboValor54 = new javax.swing.JComboBox();
        botonEliminarCriterio = new javax.swing.JButton();
        labelCriterio21 = new javax.swing.JLabel();
        labelCriterio31 = new javax.swing.JLabel();
        labelCriterio41 = new javax.swing.JLabel();
        labelCriterio51 = new javax.swing.JLabel();
        labelCriterio32 = new javax.swing.JLabel();
        labelCriterio42 = new javax.swing.JLabel();
        labelCriterio52 = new javax.swing.JLabel();
        labelCriterio53 = new javax.swing.JLabel();
        labelCriterio43 = new javax.swing.JLabel();
        labelCriterio54 = new javax.swing.JLabel();
        calcularRanking = new javax.swing.JButton();
        radioHeuristica1 = new javax.swing.JRadioButton();
        radioAHP1 = new javax.swing.JRadioButton();
        radioOtro1 = new javax.swing.JRadioButton();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        radioHeuristica2 = new javax.swing.JRadioButton();
        radioAHP2 = new javax.swing.JRadioButton();
        radioOtro2 = new javax.swing.JRadioButton();
        jScrollPane3 = new javax.swing.JScrollPane();
        tablaRanking1 = new javax.swing.JTable();
        jScrollPane4 = new javax.swing.JScrollPane();
        tablaRanking2 = new javax.swing.JTable();
        jLabel5 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        nuevaBusqueda = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        textRanking1 = new javax.swing.JTextArea();
        jScrollPane2 = new javax.swing.JScrollPane();
        textRanking2 = new javax.swing.JTextArea();
        jPanel9 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        areaDatosFamilia = new javax.swing.JTextArea();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        rbCrit1 = new javax.swing.JRadioButton();
        rbCrit2 = new javax.swing.JRadioButton();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel5 = new javax.swing.JPanel();
        labelConfCritNinio1 = new javax.swing.JLabel();
        comboConfCritNinio1 = new javax.swing.JComboBox();
        labelConfCritNinio2 = new javax.swing.JLabel();
        comboConfCritNinio2 = new javax.swing.JComboBox();
        checkCritNinio1 = new javax.swing.JCheckBox();
        checkCritNinio2 = new javax.swing.JCheckBox();
        checkCritNinio3 = new javax.swing.JCheckBox();
        comboConfCritNinio3 = new javax.swing.JComboBox();
        jSeparator4 = new javax.swing.JSeparator();
        labelConfCritNinio3 = new javax.swing.JLabel();
        rbCritNinio1 = new javax.swing.JRadioButton();
        rbCritNinio2 = new javax.swing.JRadioButton();
        labelConfCritNinio4 = new javax.swing.JLabel();
        labelConfCritNinio5 = new javax.swing.JLabel();
        jSeparator2 = new javax.swing.JSeparator();
        labelConfCrit1 = new javax.swing.JLabel();
        comboConfCritAnciano1 = new javax.swing.JComboBox();
        selNoneNiniosButton = new javax.swing.JButton();
        selAllNiniosButton = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        labelConfCritEnf1 = new javax.swing.JLabel();
        checkCritEnf1 = new javax.swing.JCheckBox();
        checkCritEnf2 = new javax.swing.JCheckBox();
        checkCritEnf3 = new javax.swing.JCheckBox();
        checkCritEnf4 = new javax.swing.JCheckBox();
        checkCritEnf5 = new javax.swing.JCheckBox();
        checkCritEnf6 = new javax.swing.JCheckBox();
        checkCritEnf7 = new javax.swing.JCheckBox();
        checkCritEnf8 = new javax.swing.JCheckBox();
        checkCritEnf9 = new javax.swing.JCheckBox();
        checkCritEnf10 = new javax.swing.JCheckBox();
        checkCritEnf11 = new javax.swing.JCheckBox();
        checkCritEnf12 = new javax.swing.JCheckBox();
        checkCritEnf13 = new javax.swing.JCheckBox();
        checkCritEnf14 = new javax.swing.JCheckBox();
        checkCritEnf15 = new javax.swing.JCheckBox();
        checkCritEnf16 = new javax.swing.JCheckBox();
        checkCritEnf17 = new javax.swing.JCheckBox();
        checkCritEnf18 = new javax.swing.JCheckBox();
        checkCritEnf19 = new javax.swing.JCheckBox();
        checkCritEnf20 = new javax.swing.JCheckBox();
        checkCritEnf21 = new javax.swing.JCheckBox();
        checkCritEnf22 = new javax.swing.JCheckBox();
        checkCritEnf23 = new javax.swing.JCheckBox();
        checkCritEnf24 = new javax.swing.JCheckBox();
        jPanel10 = new javax.swing.JPanel();
        labelConfCritEnf3 = new javax.swing.JLabel();
        labelConfCritEnf4 = new javax.swing.JLabel();
        labelConfCritEnf40 = new javax.swing.JLabel();
        labelConfCritEnf41 = new javax.swing.JLabel();
        labelConfCritEnf42 = new javax.swing.JLabel();
        labelConfCritEnf43 = new javax.swing.JLabel();
        checkCritDis1 = new javax.swing.JCheckBox();
        labelConfCritEnf37 = new javax.swing.JLabel();
        labelConfCritEnf38 = new javax.swing.JLabel();
        labelConfCritEnf39 = new javax.swing.JLabel();
        checkCritDis2 = new javax.swing.JCheckBox();
        checkCritDis3 = new javax.swing.JCheckBox();
        checkCritDis9 = new javax.swing.JCheckBox();
        checkCritDis5 = new javax.swing.JCheckBox();
        checkCritDis4 = new javax.swing.JCheckBox();
        checkCritDis6 = new javax.swing.JCheckBox();
        checkCritDis8 = new javax.swing.JCheckBox();
        checkCritDis7 = new javax.swing.JCheckBox();
        checkCritDis12 = new javax.swing.JCheckBox();
        checkCritDis11 = new javax.swing.JCheckBox();
        checkCritDis10 = new javax.swing.JCheckBox();
        jSeparator5 = new javax.swing.JSeparator();
        labelConfCritEnf2 = new javax.swing.JLabel();
        rbCritEnf1 = new javax.swing.JRadioButton();
        rbCritEnf2 = new javax.swing.JRadioButton();
        labelConfCritEnf6 = new javax.swing.JLabel();
        comboConfCritEnf1 = new javax.swing.JComboBox();
        labelConfCritEnf7 = new javax.swing.JLabel();
        labelConfCritEnf8 = new javax.swing.JLabel();
        labelConfCritEnf9 = new javax.swing.JLabel();
        comboConfCritEnf2 = new javax.swing.JComboBox();
        comboConfCritEnf3 = new javax.swing.JComboBox();
        comboConfCritEnf4 = new javax.swing.JComboBox();
        labelConfCritEnf10 = new javax.swing.JLabel();
        comboConfCritEnf5 = new javax.swing.JComboBox();
        labelConfCritEnf11 = new javax.swing.JLabel();
        comboConfCritEnf6 = new javax.swing.JComboBox();
        labelConfCritEnf12 = new javax.swing.JLabel();
        comboConfCritEnf7 = new javax.swing.JComboBox();
        labelConfCritEnf13 = new javax.swing.JLabel();
        comboConfCritEnf8 = new javax.swing.JComboBox();
        labelConfCritEnf14 = new javax.swing.JLabel();
        comboConfCritEnf9 = new javax.swing.JComboBox();
        labelConfCritEnf15 = new javax.swing.JLabel();
        comboConfCritEnf10 = new javax.swing.JComboBox();
        labelConfCritEnf16 = new javax.swing.JLabel();
        comboConfCritEnf11 = new javax.swing.JComboBox();
        labelConfCritEnf17 = new javax.swing.JLabel();
        labelConfCritEnf18 = new javax.swing.JLabel();
        labelConfCritEnf19 = new javax.swing.JLabel();
        labelConfCritEnf20 = new javax.swing.JLabel();
        labelConfCritEnf21 = new javax.swing.JLabel();
        comboConfCritEnf12 = new javax.swing.JComboBox();
        comboConfCritEnf13 = new javax.swing.JComboBox();
        comboConfCritEnf14 = new javax.swing.JComboBox();
        comboConfCritEnf15 = new javax.swing.JComboBox();
        comboConfCritEnf16 = new javax.swing.JComboBox();
        labelConfCritEnf22 = new javax.swing.JLabel();
        comboConfCritEnf17 = new javax.swing.JComboBox();
        labelConfCritEnf23 = new javax.swing.JLabel();
        labelConfCritEnf24 = new javax.swing.JLabel();
        labelConfCritEnf25 = new javax.swing.JLabel();
        labelConfCritEnf26 = new javax.swing.JLabel();
        labelConfCritEnf27 = new javax.swing.JLabel();
        labelConfCritEnf28 = new javax.swing.JLabel();
        labelConfCritEnf29 = new javax.swing.JLabel();
        comboConfCritEnf18 = new javax.swing.JComboBox();
        comboConfCritEnf19 = new javax.swing.JComboBox();
        comboConfCritEnf20 = new javax.swing.JComboBox();
        comboConfCritEnf21 = new javax.swing.JComboBox();
        comboConfCritEnf22 = new javax.swing.JComboBox();
        comboConfCritEnf23 = new javax.swing.JComboBox();
        comboConfCritEnf24 = new javax.swing.JComboBox();
        labelConfCritEnf5 = new javax.swing.JLabel();
        labelConfCritEnf30 = new javax.swing.JLabel();
        labelConfCritEnf31 = new javax.swing.JLabel();
        labelConfCritEnf32 = new javax.swing.JLabel();
        comboConfCritDis1 = new javax.swing.JComboBox();
        comboConfCritDis2 = new javax.swing.JComboBox();
        comboConfCritDis3 = new javax.swing.JComboBox();
        labelConfCritEnf33 = new javax.swing.JLabel();
        labelConfCritEnf34 = new javax.swing.JLabel();
        labelConfCritEnf35 = new javax.swing.JLabel();
        labelConfCritEnf36 = new javax.swing.JLabel();
        comboConfCritDis4 = new javax.swing.JComboBox();
        comboConfCritDis5 = new javax.swing.JComboBox();
        comboConfCritDis6 = new javax.swing.JComboBox();
        comboConfCritDis7 = new javax.swing.JComboBox();
        selNoneEnfermedadesButton = new javax.swing.JButton();
        selAllEnfermedadesButton = new javax.swing.JButton();
        jPanel8 = new javax.swing.JPanel();
        checkCritEmb1 = new javax.swing.JCheckBox();
        labelConfCritEmb1 = new javax.swing.JLabel();
        checkCritEmb2 = new javax.swing.JCheckBox();
        jSeparator6 = new javax.swing.JSeparator();
        labelConfCritEmb2 = new javax.swing.JLabel();
        rbCritEmb1 = new javax.swing.JRadioButton();
        rbCritEmb2 = new javax.swing.JRadioButton();
        labelConfCritEmb3 = new javax.swing.JLabel();
        comboConfCritEmb1 = new javax.swing.JComboBox();
        labelConfCritEmb4 = new javax.swing.JLabel();
        comboConfCritEmb2 = new javax.swing.JComboBox();
        selNoneEmbarazadasButton = new javax.swing.JButton();
        selAllEmbarazadasButton = new javax.swing.JButton();
        botonGuardarConf = new javax.swing.JButton();
        labelMsj = new javax.swing.JLabel();
        botonNuevaConfCrit = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane6 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Gestion empresarial e Investigacion operativa");
        setMinimumSize(new java.awt.Dimension(1024, 768));
        setResizable(false);

        textMsjConnect.setEditable(false);

        jLabel1.setText("Criterios de asignación");

        jPanel4.setBackground(new java.awt.Color(204, 204, 204));
        jPanel4.setPreferredSize(new java.awt.Dimension(450, 400));

        comboCriterio1.setPreferredSize(new java.awt.Dimension(100, 25));
        comboCriterio1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                comboCriterio1MousePressed(evt);
            }
        });

        jLabel2.setText("Criterio 1");

        botonAñadirCriterio.setText("Añadir Criterio");
        botonAñadirCriterio.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botonAñadirCriterioMouseClicked(evt);
            }
        });

        comboCriterio2.setPreferredSize(new java.awt.Dimension(100, 25));
        comboCriterio2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                comboCriterio2MousePressed(evt);
            }
        });

        comboValor21.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        labelMensaje.setText("Nivel de importancia respecto del:");

        labelCriterio2.setText("Criterio 2");

        labelCriterio3.setText("Criterio 3");

        comboCriterio3.setPreferredSize(new java.awt.Dimension(100, 25));
        comboCriterio3.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                comboCriterio3MousePressed(evt);
            }
        });

        comboValor31.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        comboValor32.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        labelCriterio4.setText("Criterio 4");

        comboCriterio4.setPreferredSize(new java.awt.Dimension(100, 25));
        comboCriterio4.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                comboCriterio4MousePressed(evt);
            }
        });

        comboValor41.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        comboValor42.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        comboValor43.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        labelCriterio5.setText("Criterio 5");

        comboCriterio5.setPreferredSize(new java.awt.Dimension(100, 25));

        comboValor51.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        comboValor52.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        comboValor53.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        comboValor54.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "1/9", "1/8", "1/7", "1/6", "1/5", "1/4", "1/3", "1/2", "1", "2", "3", "4", "5", "6", "7", "8", "9" }));

        botonEliminarCriterio.setText("Eliminar Criterio");
        botonEliminarCriterio.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botonEliminarCriterioMouseClicked(evt);
            }
        });

        labelCriterio21.setText("1° Criterio");

        labelCriterio31.setText("1° Criterio");

        labelCriterio41.setText("1° Criterio");

        labelCriterio51.setText("1° Criterio");

        labelCriterio32.setText("2° Criterio");

        labelCriterio42.setText("2° Criterio");

        labelCriterio52.setText("2° Criterio");

        labelCriterio53.setText("3° Criterio");

        labelCriterio43.setText("3° Criterio");

        labelCriterio54.setText("4° Criterio");

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel2)
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addComponent(comboCriterio1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(botonAñadirCriterio, javax.swing.GroupLayout.PREFERRED_SIZE, 109, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(botonEliminarCriterio))
                    .addGroup(jPanel4Layout.createSequentialGroup()
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addComponent(comboCriterio5, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(comboCriterio4, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(comboCriterio3, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(comboCriterio2, 0, 124, Short.MAX_VALUE))
                            .addComponent(labelCriterio3)
                            .addComponent(labelCriterio4)
                            .addComponent(labelCriterio5)
                            .addComponent(labelCriterio2))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addComponent(labelCriterio31)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(labelCriterio32))
                            .addComponent(comboValor21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(labelCriterio21)
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel4Layout.createSequentialGroup()
                                        .addComponent(comboValor41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addGap(18, 18, 18)
                                        .addComponent(comboValor42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(jPanel4Layout.createSequentialGroup()
                                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(comboValor31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(labelCriterio41))
                                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                        .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(labelCriterio42)
                                            .addComponent(comboValor32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelCriterio43)
                                    .addComponent(comboValor43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel4Layout.createSequentialGroup()
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelCriterio51)
                                    .addComponent(comboValor51, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(comboValor52, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(labelCriterio52))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelCriterio53)
                                    .addComponent(comboValor53, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelCriterio54)
                                    .addComponent(comboValor54, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addComponent(labelMensaje))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboCriterio1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(botonAñadirCriterio)
                    .addComponent(botonEliminarCriterio))
                .addGap(16, 16, 16)
                .addComponent(labelMensaje)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCriterio2)
                    .addComponent(labelCriterio21))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboValor21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboCriterio2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCriterio3)
                    .addComponent(labelCriterio31)
                    .addComponent(labelCriterio32))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboCriterio3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor31, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor32, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCriterio4)
                    .addComponent(labelCriterio41)
                    .addComponent(labelCriterio42)
                    .addComponent(labelCriterio43))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboCriterio4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor41, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor42, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor43, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelCriterio5)
                    .addComponent(labelCriterio51)
                    .addComponent(labelCriterio52)
                    .addComponent(labelCriterio53)
                    .addComponent(labelCriterio54))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboCriterio5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor51, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor52, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor53, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(comboValor54, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        calcularRanking.setText("Calcular Ranking");
        calcularRanking.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                calcularRankingMouseClicked(evt);
            }
        });

        buttonGroup1.add(radioHeuristica1);
        radioHeuristica1.setSelected(true);
        radioHeuristica1.setText("Heurístico");

        buttonGroup1.add(radioAHP1);
        radioAHP1.setText("AHP");

        buttonGroup1.add(radioOtro1);
        radioOtro1.setText("Arrow Raynaud Mejorado");

        jLabel3.setText("Métodos de ordenación 1");

        jLabel4.setText("Métodos de ordenación 2");

        buttonGroup2.add(radioHeuristica2);
        radioHeuristica2.setSelected(true);
        radioHeuristica2.setText("Heurístico");
        radioHeuristica2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                radioHeuristica2ActionPerformed(evt);
            }
        });

        buttonGroup2.add(radioAHP2);
        radioAHP2.setText("AHP");

        buttonGroup2.add(radioOtro2);
        radioOtro2.setText("Arrow Raynaud Mejorado");

        tablaRanking1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Posición", "Familia", "Puntaje"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaRanking1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tablaRanking1MouseClicked(evt);
            }
            public void mouseReleased(java.awt.event.MouseEvent evt) {
                tablaRanking1MouseReleased(evt);
            }
        });
        jScrollPane3.setViewportView(tablaRanking1);

        tablaRanking2.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null},
                {null, null, null},
                {null, null, null},
                {null, null, null}
            },
            new String [] {
                "Posición", "Familia", "Puntaje"
            }
        ) {
            boolean[] canEdit = new boolean [] {
                false, false, false
            };

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        tablaRanking2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                tablaRanking2MouseClicked(evt);
            }
        });
        jScrollPane4.setViewportView(tablaRanking2);

        jLabel5.setText("Ranking 1");

        jLabel6.setText("Ranking 2");

        nuevaBusqueda.setText("Nueva búsqueda");
        nuevaBusqueda.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                nuevaBusquedaMouseClicked(evt);
            }
        });

        textRanking1.setEditable(false);
        textRanking1.setColumns(20);
        textRanking1.setRows(5);
        jScrollPane1.setViewportView(textRanking1);

        textRanking2.setEditable(false);
        textRanking2.setColumns(20);
        textRanking2.setRows(5);
        jScrollPane2.setViewportView(textRanking2);

        jPanel9.setBackground(new java.awt.Color(204, 204, 204));

        areaDatosFamilia.setColumns(20);
        areaDatosFamilia.setLineWrap(true);
        areaDatosFamilia.setRows(5);
        jScrollPane5.setViewportView(areaDatosFamilia);

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 514, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 109, Short.MAX_VALUE)
                .addContainerGap())
        );

        jButton1.setText("Conectar");
        jButton1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton1MouseClicked(evt);
            }
        });

        jButton2.setText("Desconectar");
        jButton2.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jButton2MouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jSeparator1)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addComponent(jButton1)
                                .addGap(18, 18, 18)
                                .addComponent(jButton2)
                                .addGap(36, 36, 36)
                                .addComponent(textMsjConnect, javax.swing.GroupLayout.PREFERRED_SIZE, 250, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jLabel1)
                            .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, 474, Short.MAX_VALUE)))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(32, 32, 32)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGap(129, 129, 129)
                                .addComponent(calcularRanking))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(jLabel3)
                                    .addComponent(radioAHP1)
                                    .addComponent(radioHeuristica1)
                                    .addComponent(radioOtro1))
                                .addGap(99, 99, 99)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(radioHeuristica2)
                                    .addComponent(jLabel4)
                                    .addComponent(radioAHP2)
                                    .addComponent(radioOtro2))))))
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(229, 229, 229)
                        .addComponent(nuevaBusqueda))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jScrollPane1)
                                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)
                                    .addComponent(jLabel5))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(jLabel6)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 264, Short.MAX_VALUE)
                                    .addComponent(jScrollPane2))))))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(textMsjConnect, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(nuevaBusqueda)
                    .addComponent(jButton1)
                    .addComponent(jButton2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel1)
                    .addComponent(jLabel5)
                    .addComponent(jLabel6))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
                    .addComponent(jPanel4, javax.swing.GroupLayout.DEFAULT_SIZE, 326, Short.MAX_VALUE)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jPanel9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(jLabel4)
                            .addComponent(jLabel3))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(radioHeuristica1)
                            .addComponent(radioHeuristica2))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(radioAHP1)
                            .addComponent(radioAHP2))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(radioOtro1)
                            .addComponent(radioOtro2))
                        .addGap(18, 18, 18)
                        .addComponent(calcularRanking)))
                .addContainerGap(72, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Asignación", jPanel1);

        buttonGroup3.add(rbCrit1);
        rbCrit1.setSelected(true);
        rbCrit1.setText("Predeterminado");
        rbCrit1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCrit1ActionPerformed(evt);
            }
        });

        buttonGroup3.add(rbCrit2);
        rbCrit2.setText("Personalizado");
        rbCrit2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCrit2ActionPerformed(evt);
            }
        });

        labelConfCritNinio1.setText("Seleccionar los campos que se quieren incluir al criterio. En la opción predeterminada se incluyen todos.");

        labelConfCritNinio2.setText("Revalorizar los campos incluidos en el criterio.");

        checkCritNinio1.setText("Bebé");

        checkCritNinio2.setText("Infante");

        checkCritNinio3.setText("Niño");

        labelConfCritNinio3.setText("Bebé");

        buttonGroup4.add(rbCritNinio1);
        rbCritNinio1.setSelected(true);
        rbCritNinio1.setText("Predeterminado");
        rbCritNinio1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCritNinio1ActionPerformed(evt);
            }
        });

        buttonGroup4.add(rbCritNinio2);
        rbCritNinio2.setText("Personalizado");
        rbCritNinio2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCritNinio2ActionPerformed(evt);
            }
        });

        labelConfCritNinio4.setText("Infante");

        labelConfCritNinio5.setText("Niño");

        labelConfCrit1.setText("Ancianos");

        selNoneNiniosButton.setText("Deseleccionar todos");
        selNoneNiniosButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                selNoneNiniosButtonMouseClicked(evt);
            }
        });

        selAllNiniosButton.setText("Seleccionar todos");
        selAllNiniosButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                selAllNiniosButtonMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(labelConfCrit1)
                .addGap(18, 18, 18)
                .addComponent(comboConfCritAnciano1, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jSeparator4, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addComponent(checkCritNinio1)
                                        .addGap(18, 18, 18)
                                        .addComponent(checkCritNinio2)
                                        .addGap(18, 18, 18)
                                        .addComponent(checkCritNinio3))
                                    .addComponent(labelConfCritNinio2)
                                    .addComponent(labelConfCritNinio3)
                                    .addGroup(jPanel5Layout.createSequentialGroup()
                                        .addComponent(rbCritNinio1)
                                        .addGap(18, 18, 18)
                                        .addComponent(rbCritNinio2)))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 772, Short.MAX_VALUE))
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addComponent(labelConfCritNinio1)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(selAllNiniosButton, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(selNoneNiniosButton))))
                    .addComponent(jSeparator2)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addGap(74, 74, 74)
                                .addComponent(comboConfCritNinio1, javax.swing.GroupLayout.PREFERRED_SIZE, 56, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel5Layout.createSequentialGroup()
                                .addContainerGap()
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelConfCritNinio4)
                                    .addComponent(labelConfCritNinio5))
                                .addGap(28, 28, 28)
                                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(comboConfCritNinio3, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(comboConfCritNinio2, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel5Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(labelConfCritNinio1))
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(selNoneNiniosButton)
                        .addComponent(selAllNiniosButton)))
                .addGap(21, 21, 21)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(checkCritNinio1)
                    .addComponent(checkCritNinio2)
                    .addComponent(checkCritNinio3))
                .addGap(18, 18, 18)
                .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelConfCritNinio2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbCritNinio1)
                    .addComponent(rbCritNinio2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelConfCritNinio3, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(comboConfCritNinio1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboConfCritNinio2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelConfCritNinio4))
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(comboConfCritNinio3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(labelConfCritNinio5))
                .addGap(18, 18, 18)
                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelConfCrit1)
                    .addComponent(comboConfCritAnciano1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(328, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Niños y Ancianos", jPanel5);

        labelConfCritEnf1.setText("Seleccionar los campos que se quieren incluir al criterio. En la opción predeterminada se incluyen todos.");

        checkCritEnf1.setText("Bazo (No crónico)");

        checkCritEnf2.setText("Bazo");

        checkCritEnf3.setText("Celiaquía");

        checkCritEnf4.setText("Cerebrales/Neurológicas");

        checkCritEnf5.setText("Circulatoria/Coronaria");

        checkCritEnf6.setText("Colesterol/Triglicéridos");

        checkCritEnf7.setText("Desnutrición");

        checkCritEnf8.setText("Diabetes");

        checkCritEnf9.setText("Diarreas crónicas");

        checkCritEnf10.setText("Digestivas");

        checkCritEnf11.setText("Enfermedades renales");

        checkCritEnf12.setText("Epilepsia");

        checkCritEnf13.setText("Glandulares");

        checkCritEnf14.setText("Gota");

        checkCritEnf15.setText("Hepatitis");

        checkCritEnf16.setText("Hipertensión");

        checkCritEnf17.setText("HIV");

        checkCritEnf18.setText("Sífilis");

        checkCritEnf19.setText("Tumores");

        checkCritEnf20.setText("Visuales");

        checkCritEnf21.setText("Auditivas");

        checkCritEnf22.setText("Fobias");

        checkCritEnf23.setText("Alergias");

        checkCritEnf24.setText("Otros");

        jPanel10.setBackground(new java.awt.Color(204, 204, 204));

        labelConfCritEnf3.setText("Discapacidades");

        labelConfCritEnf4.setText("Nivel de discapacidad");

        labelConfCritEnf40.setText("Neurológica");

        labelConfCritEnf41.setText("Motora");

        labelConfCritEnf42.setText("Física");

        labelConfCritEnf43.setText("Psiquiátrica");

        labelConfCritEnf37.setText("Leve");

        labelConfCritEnf38.setText("Moderada");

        labelConfCritEnf39.setText("Grave");

        checkCritDis9.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkCritDis9ActionPerformed(evt);
            }
        });

        checkCritDis5.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                checkCritDis5ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel10Layout.createSequentialGroup()
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelConfCritEnf3)
                                    .addComponent(labelConfCritEnf40)
                                    .addComponent(labelConfCritEnf41))
                                .addGap(22, 22, 22))
                            .addComponent(labelConfCritEnf43, javax.swing.GroupLayout.Alignment.LEADING))
                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addGap(7, 7, 7)
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(checkCritDis4)
                                    .addComponent(checkCritDis1)
                                    .addComponent(checkCritDis7)
                                    .addComponent(checkCritDis10)
                                    .addComponent(labelConfCritEnf37))
                                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel10Layout.createSequentialGroup()
                                        .addGap(46, 46, 46)
                                        .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(checkCritDis2)
                                            .addComponent(checkCritDis5)
                                            .addComponent(checkCritDis8)
                                            .addComponent(checkCritDis11)))
                                    .addGroup(jPanel10Layout.createSequentialGroup()
                                        .addGap(32, 32, 32)
                                        .addComponent(labelConfCritEnf38))))
                            .addGroup(jPanel10Layout.createSequentialGroup()
                                .addGap(30, 30, 30)
                                .addComponent(labelConfCritEnf4)))
                        .addGap(10, 10, 10))
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel10Layout.createSequentialGroup()
                        .addComponent(labelConfCritEnf42)
                        .addGap(142, 142, 142)))
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(checkCritDis6)
                    .addComponent(checkCritDis3)
                    .addComponent(checkCritDis9)
                    .addComponent(checkCritDis12)
                    .addComponent(labelConfCritEnf39))
                .addGap(0, 21, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelConfCritEnf3)
                    .addComponent(labelConfCritEnf4))
                .addGap(18, 18, 18)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelConfCritEnf37)
                    .addComponent(labelConfCritEnf38)
                    .addComponent(labelConfCritEnf39))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelConfCritEnf40)
                    .addComponent(checkCritDis1)
                    .addComponent(checkCritDis2)
                    .addComponent(checkCritDis3))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelConfCritEnf41)
                    .addComponent(checkCritDis4)
                    .addComponent(checkCritDis5)
                    .addComponent(checkCritDis6))
                .addGap(7, 7, 7)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(checkCritDis7)
                    .addComponent(labelConfCritEnf42)
                    .addComponent(checkCritDis8)
                    .addComponent(checkCritDis9))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelConfCritEnf43)
                    .addComponent(checkCritDis10)
                    .addComponent(checkCritDis11)
                    .addComponent(checkCritDis12))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        labelConfCritEnf2.setText("Revalorizar los campos incluidos en el criterio.");

        buttonGroup5.add(rbCritEnf1);
        rbCritEnf1.setSelected(true);
        rbCritEnf1.setText("Predeterminado");
        rbCritEnf1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCritEnf1ActionPerformed(evt);
            }
        });

        buttonGroup5.add(rbCritEnf2);
        rbCritEnf2.setText("Personalizado");
        rbCritEnf2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCritEnf2ActionPerformed(evt);
            }
        });

        labelConfCritEnf6.setText("Bazo (No crónico)");

        labelConfCritEnf7.setText("Bazo");

        labelConfCritEnf8.setText("Celiaquía");

        labelConfCritEnf9.setText("Cerebrales/Neurológicas");

        labelConfCritEnf10.setText("Circulatoria/Coronaria");

        labelConfCritEnf11.setText("Colesterol/Triglicéridos");

        labelConfCritEnf12.setText("Desnutrición");

        labelConfCritEnf13.setText("Diabetes");

        labelConfCritEnf14.setText("Diarreas crónicas");

        labelConfCritEnf15.setText("Digestivas");

        labelConfCritEnf16.setText("Enfermedades renales");

        labelConfCritEnf17.setText("Epilepsia");

        labelConfCritEnf18.setText("Glandulares");

        labelConfCritEnf19.setText("Gota");

        labelConfCritEnf20.setText("Hepatitis");

        labelConfCritEnf21.setText("Hipertensión");

        labelConfCritEnf22.setText("HIV");

        labelConfCritEnf23.setText("Sífilis");

        labelConfCritEnf24.setText("Tumores");

        labelConfCritEnf25.setText("Visuales");

        labelConfCritEnf26.setText("Auditivas");

        labelConfCritEnf27.setText("Fobias");

        labelConfCritEnf28.setText("Alergias");

        labelConfCritEnf29.setText("Otros");

        labelConfCritEnf5.setText("Personalizar nivel de discapacidades");

        labelConfCritEnf30.setText("Leve");

        labelConfCritEnf31.setText("Moderada");

        labelConfCritEnf32.setText("Grave");

        labelConfCritEnf33.setText("Motora");

        labelConfCritEnf34.setText("Neurológica");

        labelConfCritEnf35.setText("Psiquiátrica");

        labelConfCritEnf36.setText("Física");

        selNoneEnfermedadesButton.setText("Deseleccionar todos");
        selNoneEnfermedadesButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                selNoneEnfermedadesButtonMouseClicked(evt);
            }
        });

        selAllEnfermedadesButton.setText("Seleccionar todos");
        selAllEnfermedadesButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                selAllEnfermedadesButtonMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel7Layout = new javax.swing.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jSeparator5)
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(checkCritEnf1)
                                    .addComponent(checkCritEnf2)
                                    .addComponent(checkCritEnf3)
                                    .addComponent(checkCritEnf4)
                                    .addComponent(checkCritEnf5)
                                    .addComponent(checkCritEnf6)
                                    .addComponent(checkCritEnf7)
                                    .addComponent(checkCritEnf8))
                                .addGap(57, 57, 57)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(checkCritEnf9)
                                    .addComponent(checkCritEnf10)
                                    .addComponent(checkCritEnf11)
                                    .addComponent(checkCritEnf12)
                                    .addComponent(checkCritEnf13)
                                    .addComponent(checkCritEnf14)
                                    .addComponent(checkCritEnf15)
                                    .addComponent(checkCritEnf16))
                                .addGap(64, 64, 64)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(checkCritEnf24)
                                    .addComponent(checkCritEnf23)
                                    .addComponent(checkCritEnf22)
                                    .addComponent(checkCritEnf21)
                                    .addComponent(checkCritEnf20)
                                    .addComponent(checkCritEnf19)
                                    .addComponent(checkCritEnf18)
                                    .addComponent(checkCritEnf17))
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 93, Short.MAX_VALUE)
                                .addComponent(jPanel10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(124, 124, 124)))
                        .addContainerGap())
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel7Layout.createSequentialGroup()
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelConfCritEnf9)
                                    .addComponent(labelConfCritEnf10)
                                    .addComponent(labelConfCritEnf11)
                                    .addComponent(labelConfCritEnf12)
                                    .addComponent(labelConfCritEnf13)
                                    .addComponent(labelConfCritEnf7)
                                    .addComponent(labelConfCritEnf6)
                                    .addComponent(labelConfCritEnf8))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(comboConfCritEnf8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                        .addComponent(comboConfCritEnf1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                        .addComponent(comboConfCritEnf2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(comboConfCritEnf3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(44, 44, 44)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelConfCritEnf14)
                                    .addComponent(labelConfCritEnf15)
                                    .addComponent(labelConfCritEnf16)
                                    .addComponent(labelConfCritEnf17)
                                    .addComponent(labelConfCritEnf18)
                                    .addComponent(labelConfCritEnf19)
                                    .addComponent(labelConfCritEnf21)
                                    .addComponent(labelConfCritEnf20))
                                .addGap(18, 18, 18)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(comboConfCritEnf9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEnf15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                .addGap(52, 52, 52)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelConfCritEnf22)
                                    .addComponent(labelConfCritEnf23)
                                    .addComponent(labelConfCritEnf24)
                                    .addComponent(labelConfCritEnf25)
                                    .addComponent(labelConfCritEnf26)
                                    .addComponent(labelConfCritEnf27)
                                    .addComponent(labelConfCritEnf28)
                                    .addComponent(labelConfCritEnf29))
                                .addGap(40, 40, 40)
                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(comboConfCritEnf24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGroup(jPanel7Layout.createSequentialGroup()
                                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(comboConfCritEnf19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(comboConfCritEnf18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(comboConfCritEnf17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(comboConfCritEnf20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(comboConfCritEnf21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(comboConfCritEnf22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(comboConfCritEnf23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                                        .addGap(70, 70, 70)
                                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                .addComponent(labelConfCritEnf30)
                                                .addComponent(labelConfCritEnf31)
                                                .addComponent(labelConfCritEnf32)
                                                .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel7Layout.createSequentialGroup()
                                                    .addGap(117, 117, 117)
                                                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                                        .addComponent(comboConfCritDis2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(comboConfCritDis1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                        .addComponent(comboConfCritDis3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                                                .addComponent(labelConfCritEnf5))
                                            .addGroup(jPanel7Layout.createSequentialGroup()
                                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(labelConfCritEnf33)
                                                    .addComponent(labelConfCritEnf34)
                                                    .addComponent(labelConfCritEnf35)
                                                    .addComponent(labelConfCritEnf36))
                                                .addGap(89, 89, 89)
                                                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(comboConfCritDis7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(comboConfCritDis6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(comboConfCritDis5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addComponent(comboConfCritDis4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))))))
                            .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jPanel7Layout.createSequentialGroup()
                                    .addComponent(rbCritEnf1)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(rbCritEnf2))
                                .addComponent(labelConfCritEnf2, javax.swing.GroupLayout.Alignment.LEADING)))
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addComponent(labelConfCritEnf1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(selAllEnfermedadesButton, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(selNoneEnfermedadesButton))))
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel7Layout.createSequentialGroup()
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(labelConfCritEnf1))
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(selNoneEnfermedadesButton)
                        .addComponent(selAllEnfermedadesButton)))
                .addGap(18, 18, 18)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkCritEnf1)
                            .addComponent(checkCritEnf9)
                            .addComponent(checkCritEnf17))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkCritEnf2)
                            .addComponent(checkCritEnf10)
                            .addComponent(checkCritEnf18))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkCritEnf3)
                            .addComponent(checkCritEnf11)
                            .addComponent(checkCritEnf19))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkCritEnf4)
                            .addComponent(checkCritEnf12)
                            .addComponent(checkCritEnf20))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkCritEnf5)
                            .addComponent(checkCritEnf13)
                            .addComponent(checkCritEnf21))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkCritEnf6)
                            .addComponent(checkCritEnf14)
                            .addComponent(checkCritEnf22))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkCritEnf7)
                            .addComponent(checkCritEnf15)
                            .addComponent(checkCritEnf23))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(checkCritEnf8)
                            .addComponent(checkCritEnf16)
                            .addComponent(checkCritEnf24)))
                    .addComponent(jPanel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(27, 27, 27)
                .addComponent(jSeparator5, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(labelConfCritEnf2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(labelConfCritEnf5, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(rbCritEnf1)
                        .addComponent(rbCritEnf2)))
                .addGap(18, 18, 18)
                .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf6)
                            .addComponent(comboConfCritEnf1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf7)
                            .addComponent(comboConfCritEnf2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf8)
                            .addComponent(comboConfCritEnf3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf9)
                            .addComponent(comboConfCritEnf4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelConfCritEnf10)
                            .addComponent(comboConfCritEnf5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelConfCritEnf11)
                            .addComponent(comboConfCritEnf6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelConfCritEnf12)
                            .addComponent(comboConfCritEnf7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelConfCritEnf13)
                            .addComponent(comboConfCritEnf8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf30)
                            .addComponent(comboConfCritDis1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf31)
                            .addComponent(comboConfCritDis2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf32)
                            .addComponent(comboConfCritDis3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelConfCritEnf33)
                            .addComponent(comboConfCritDis4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(comboConfCritDis5, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(comboConfCritDis6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(18, 18, 18)
                        .addComponent(comboConfCritDis7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf14)
                            .addComponent(comboConfCritEnf9, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf15)
                            .addComponent(comboConfCritEnf10, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf16)
                            .addComponent(comboConfCritEnf11, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf17)
                            .addComponent(comboConfCritEnf12, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf18)
                            .addComponent(comboConfCritEnf13, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelConfCritEnf19)
                            .addComponent(comboConfCritEnf14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(comboConfCritEnf16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(labelConfCritEnf20))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf21)
                            .addComponent(comboConfCritEnf15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGroup(jPanel7Layout.createSequentialGroup()
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf22)
                            .addComponent(comboConfCritEnf17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf23)
                            .addComponent(comboConfCritEnf18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf24)
                            .addComponent(comboConfCritEnf19, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf25)
                            .addComponent(comboConfCritEnf20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf26)
                            .addComponent(comboConfCritEnf21, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(labelConfCritEnf34))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf27)
                            .addComponent(comboConfCritEnf22, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(labelConfCritEnf35))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(labelConfCritEnf28)
                            .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                .addComponent(comboConfCritEnf23, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addComponent(labelConfCritEnf36)))
                        .addGap(18, 18, 18)
                        .addGroup(jPanel7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(labelConfCritEnf29)
                            .addComponent(comboConfCritEnf24, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                .addContainerGap(41, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Enfermos", jPanel7);

        checkCritEmb1.setText("Normal");

        labelConfCritEmb1.setText("Seleccionar los campos que se quieren incluir al criterio. En la opción predeterminada se incluyen todos.");

        checkCritEmb2.setText("Complicado");

        labelConfCritEmb2.setText("Revalorizar los campos incluidos en el criterio.");

        buttonGroup6.add(rbCritEmb1);
        rbCritEmb1.setSelected(true);
        rbCritEmb1.setText("Predeterminado");
        rbCritEmb1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCritEmb1ActionPerformed(evt);
            }
        });

        buttonGroup6.add(rbCritEmb2);
        rbCritEmb2.setText("Personalizado");
        rbCritEmb2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbCritEmb2ActionPerformed(evt);
            }
        });

        labelConfCritEmb3.setText("Normal");

        labelConfCritEmb4.setText("Complicado");

        selNoneEmbarazadasButton.setText("Deseleccionar todos");
        selNoneEmbarazadasButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                selNoneEmbarazadasButtonMouseClicked(evt);
            }
        });

        selAllEmbarazadasButton.setText("Seleccionar todos");
        selAllEmbarazadasButton.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                selAllEmbarazadasButtonMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel8Layout = new javax.swing.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(jSeparator6)
                        .addContainerGap())
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(rbCritEmb1)
                                .addGap(18, 18, 18)
                                .addComponent(rbCritEmb2))
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addComponent(checkCritEmb1)
                                .addGap(18, 18, 18)
                                .addComponent(checkCritEmb2))
                            .addComponent(labelConfCritEmb2)
                            .addGroup(jPanel8Layout.createSequentialGroup()
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(labelConfCritEmb3)
                                    .addComponent(labelConfCritEmb4))
                                .addGap(40, 40, 40)
                                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(comboConfCritEmb2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(comboConfCritEmb1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
                        .addGap(0, 772, Short.MAX_VALUE))
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addComponent(labelConfCritEmb1)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(selAllEmbarazadasButton, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(selNoneEmbarazadasButton))))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel8Layout.createSequentialGroup()
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel8Layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(labelConfCritEmb1))
                    .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(selNoneEmbarazadasButton)
                        .addComponent(selAllEmbarazadasButton)))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(checkCritEmb1)
                    .addComponent(checkCritEmb2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jSeparator6, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(labelConfCritEmb2)
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbCritEmb1)
                    .addComponent(rbCritEmb2))
                .addGap(18, 18, 18)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelConfCritEmb3)
                    .addComponent(comboConfCritEmb1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(23, 23, 23)
                .addGroup(jPanel8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(labelConfCritEmb4)
                    .addComponent(comboConfCritEmb2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(429, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("Embarazadas", jPanel8);

        botonGuardarConf.setText("Guardar Personalizacion");
        botonGuardarConf.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botonGuardarConfMouseClicked(evt);
            }
        });

        botonNuevaConfCrit.setText("Nueva Configuración");
        botonNuevaConfCrit.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                botonNuevaConfCritMouseClicked(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 1005, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(rbCrit1)
                        .addGap(18, 18, 18)
                        .addComponent(rbCrit2)
                        .addGap(18, 18, 18)
                        .addComponent(botonNuevaConfCrit)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(botonGuardarConf)
                        .addGap(23, 23, 23)
                        .addComponent(labelMsj)))
                .addContainerGap(31, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(rbCrit1)
                    .addComponent(rbCrit2)
                    .addComponent(botonGuardarConf)
                    .addComponent(botonNuevaConfCrit)
                    .addComponent(labelMsj))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jTabbedPane2)
                .addContainerGap())
        );

        jTabbedPane1.addTab("Configurar Criterios", jPanel2);

        jTextArea1.setEditable(false);
        jTextArea1.setColumns(20);
        jTextArea1.setRows(5);
        jTextArea1.setText("Herramienta para el ordenamiento de alternativas.\n\nFacultad de Ciencias Exactas - Universidad del Centro de la Provincia de Buenos Aires\n\nTrabajo correspondiente a las materias:\n\nOrganización y Gestión Empresarial\nInvestigación Operativa\n\n\nDocentes:\nDaniel Xodo\nMoises Bueno\nGustavo Illescas\n\n\n\nAlumnos:\nEtchepare, Juan Federico\nmail: federicoethcepare@gmail.com\nSanchez Lopez, Mauro Facundo\nmail: maurofacundosanchezlopez@gmail.com\nSuzuki, Pedro Leandro\nmail: pedrol.suzuki@gmail.com\nZinni, Ivan Carlos\nmail: zinni.ivan@gmail.com\n\nTandil, 2013\n\n\n");
        jScrollPane6.setViewportView(jTextArea1);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane6, javax.swing.GroupLayout.DEFAULT_SIZE, 1026, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jScrollPane6, javax.swing.GroupLayout.PREFERRED_SIZE, 552, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(180, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab("Acerca de", jPanel3);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1)
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jTabbedPane1)
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void actualizarCombo(int cant)
    {
        critCombos = new ArrayList<String>();
        critCombos.add("Enfermedad");
        critCombos.add("Embarazadas");
        critCombos.add("Niños");
        critCombos.add("Ancianos");
        
        ArrayList<String> values = new ArrayList<String>();
        for(int i = 1; i <= cant; i++)
        {
            JComboBox combo = (JComboBox)botones.get("cc"+i);
            if(combo.getSelectedItem() == null)
            {
                values.add(critCombos.get(0));
            }
            else
            {
                values.add((String)combo.getSelectedItem());
            }
            critCombos.remove(values.get(i-1));
        }
        for(int i = cant; i > 0; i--)
        {
            JComboBox combo = (JComboBox)botones.get("cc"+i);
            String item = values.get(i-1);
            critCombos.add(item);
            Collections.sort(critCombos);
            combo.removeAllItems();
            for (String c: critCombos)
            {
                combo.addItem(c);
            }
            combo.setSelectedItem(item);
            critCombos.remove(combo.getSelectedItem());
        }
    }
    
    //boton que añade un criterio mas para la búsqueda
    private void botonAñadirCriterioMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonAñadirCriterioMouseClicked
        labelMensaje.setVisible(true);
        botonEliminarCriterio.setVisible(true);
        if (cantidadCrit < MAXCRITERIOS){
            cantidadCrit = cantidadCrit + 1;
            JLabel etiq = (JLabel) botones.get("lc"+cantidadCrit);
            etiq.setVisible(true);
            JComboBox combo = (JComboBox) botones.get("cc"+cantidadCrit);
            actualizarCombo(cantidadCrit);
            combo.setVisible(true);
            for (int i = 1; i < cantidadCrit; i++){
                JComboBox comboV = (JComboBox) botones.get("cv"+cantidadCrit+i);
                JLabel etiqCriterio = (JLabel) botones.get("lc"+cantidadCrit+i);
                comboV.setVisible(true);
                etiqCriterio.setVisible(true);
            }
        }
    }//GEN-LAST:event_botonAñadirCriterioMouseClicked

    //boton que elimina el ultimo criterio agregado para la búsqueda
    private void botonEliminarCriterioMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonEliminarCriterioMouseClicked
        if(cantidadCrit == 2) {
            labelMensaje.setVisible(false);
            botonEliminarCriterio.setVisible(false);
        }
        JLabel etiq = (JLabel) botones.get("lc"+cantidadCrit);
        etiq.setVisible(false);
        JComboBox combo = (JComboBox) botones.get("cc"+cantidadCrit);
        combo.setVisible(false);
        combo.setSelectedItem(null);
        for (int i=1;i<cantidadCrit;i++){
            JComboBox comboV = (JComboBox) botones.get("cv"+cantidadCrit+i);
            JLabel etiqCriterio = (JLabel) botones.get("lc"+cantidadCrit+i);
            comboV.setVisible(false);
            etiqCriterio.setVisible(false);
        }
        cantidadCrit = cantidadCrit - 1;
        actualizarCombo(cantidadCrit);
    }//GEN-LAST:event_botonEliminarCriterioMouseClicked

    private void radioHeuristica2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_radioHeuristica2ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_radioHeuristica2ActionPerformed

    private void desactivarTodo(){
        rbCritNinio1.setSelected(true);
        rbCritEnf1.setSelected(true);
        rbCritEmb1.setSelected(true);
        labelConfCrit1.setEnabled(false);
        labelConfCritNinio1.setEnabled(false);
        labelConfCritNinio2.setEnabled(false);
        comboConfCritAnciano1.setEnabled(false);
        comboConfCritNinio1.setEnabled(false);
        comboConfCritNinio2.setEnabled(false);
        comboConfCritNinio3.setEnabled(false);
        checkCritNinio1.setEnabled(false);
        checkCritNinio2.setEnabled(false);
        checkCritNinio3.setEnabled(false);
        rbCritNinio1.setEnabled(false);
        rbCritNinio2.setEnabled(false);
        botonGuardarConf.setEnabled(false);
        
        //enfermos
        checkCritEnf1.setEnabled(false);
        checkCritEnf2.setEnabled(false);
        checkCritEnf3.setEnabled(false);
        checkCritEnf4.setEnabled(false);
        checkCritEnf5.setEnabled(false);
        checkCritEnf6.setEnabled(false);
        checkCritEnf7.setEnabled(false);
        checkCritEnf8.setEnabled(false);
        checkCritEnf9.setEnabled(false);
        checkCritEnf10.setEnabled(false);
        checkCritEnf11.setEnabled(false);
        checkCritEnf12.setEnabled(false);
        checkCritEnf13.setEnabled(false);
        checkCritEnf14.setEnabled(false);
        checkCritEnf15.setEnabled(false);
        checkCritEnf16.setEnabled(false);
        checkCritEnf17.setEnabled(false);
        checkCritEnf18.setEnabled(false);
        checkCritEnf19.setEnabled(false);
        checkCritEnf20.setEnabled(false);
        checkCritEnf21.setEnabled(false);
        checkCritEnf22.setEnabled(false);
        checkCritEnf23.setEnabled(false);
        checkCritEnf24.setEnabled(false);
        checkCritEnf1.setEnabled(false); 
        labelConfCritEnf1.setEnabled(false);
        labelConfCritEnf2.setEnabled(false);
        labelConfCritEnf3.setEnabled(false);
        labelConfCritEnf4.setEnabled(false);
        labelConfCritEnf5.setEnabled(false);
        labelConfCritEnf6.setEnabled(false);
        labelConfCritEnf7.setEnabled(false);
        labelConfCritEnf8.setEnabled(false);
        labelConfCritEnf9.setEnabled(false);
        labelConfCritEnf10.setEnabled(false);
        labelConfCritEnf11.setEnabled(false);
        labelConfCritEnf12.setEnabled(false);
        labelConfCritEnf13.setEnabled(false);
        labelConfCritEnf14.setEnabled(false);
        labelConfCritEnf15.setEnabled(false);
        labelConfCritEnf16.setEnabled(false);
        labelConfCritEnf17.setEnabled(false);
        labelConfCritEnf18.setEnabled(false);
        labelConfCritEnf19.setEnabled(false);
        labelConfCritEnf20.setEnabled(false);
        labelConfCritEnf21.setEnabled(false);
        labelConfCritEnf22.setEnabled(false);
        labelConfCritEnf23.setEnabled(false);
        labelConfCritEnf24.setEnabled(false);
        labelConfCritEnf25.setEnabled(false);
        labelConfCritEnf26.setEnabled(false);
        labelConfCritEnf27.setEnabled(false);
        labelConfCritEnf28.setEnabled(false);
        labelConfCritEnf29.setEnabled(false);
        labelConfCritEnf30.setEnabled(false);
        labelConfCritEnf31.setEnabled(false);
        labelConfCritEnf32.setEnabled(false);
        labelConfCritEnf33.setEnabled(false);
        labelConfCritEnf34.setEnabled(false);
        labelConfCritEnf35.setEnabled(false);
        labelConfCritEnf36.setEnabled(false);
        labelConfCritEnf37.setEnabled(false);
        labelConfCritEnf38.setEnabled(false);
        labelConfCritEnf39.setEnabled(false);
        labelConfCritEnf40.setEnabled(false);
        labelConfCritEnf41.setEnabled(false);
        labelConfCritEnf42.setEnabled(false);
        labelConfCritEnf43.setEnabled(false);
        comboConfCritEnf1.setEnabled(false);
        comboConfCritEnf2.setEnabled(false);
        comboConfCritEnf3.setEnabled(false);
        comboConfCritEnf4.setEnabled(false);
        comboConfCritEnf5.setEnabled(false);
        comboConfCritEnf6.setEnabled(false);
        comboConfCritEnf7.setEnabled(false);
        comboConfCritEnf8.setEnabled(false);
        comboConfCritEnf9.setEnabled(false);
        comboConfCritEnf10.setEnabled(false);
        comboConfCritEnf11.setEnabled(false);
        comboConfCritEnf12.setEnabled(false);
        comboConfCritEnf13.setEnabled(false);
        comboConfCritEnf14.setEnabled(false);
        comboConfCritEnf15.setEnabled(false);
        comboConfCritEnf16.setEnabled(false);
        comboConfCritEnf17.setEnabled(false);
        comboConfCritEnf18.setEnabled(false);
        comboConfCritEnf19.setEnabled(false);
        comboConfCritEnf20.setEnabled(false);
        comboConfCritEnf21.setEnabled(false);
        comboConfCritEnf22.setEnabled(false);
        comboConfCritEnf23.setEnabled(false);
        comboConfCritEnf24.setEnabled(false);
        comboConfCritDis1.setEnabled(false);
        comboConfCritDis2.setEnabled(false);
        comboConfCritDis3.setEnabled(false);
        comboConfCritDis4.setEnabled(false);
        comboConfCritDis5.setEnabled(false);
        comboConfCritDis6.setEnabled(false);
        comboConfCritDis7.setEnabled(false);
        
        
        //discapacitados
        rbCritEnf1.setEnabled(false);
        rbCritEnf2.setEnabled(false);
        checkCritDis1.setEnabled(false);
        checkCritDis2.setEnabled(false);
        checkCritDis3.setEnabled(false);
        checkCritDis4.setEnabled(false);
        checkCritDis5.setEnabled(false);
        checkCritDis6.setEnabled(false);
        checkCritDis7.setEnabled(false);
        checkCritDis8.setEnabled(false);
        checkCritDis9.setEnabled(false);
        checkCritDis10.setEnabled(false);
        checkCritDis11.setEnabled(false);
        checkCritDis12.setEnabled(false);
        
        //embarazadas
        labelConfCritEmb1.setEnabled(false);
        labelConfCritEmb2.setEnabled(false);
        labelConfCritEmb3.setEnabled(false);
        labelConfCritEmb4.setEnabled(false);
        checkCritEmb1.setEnabled(false);
        checkCritEmb2.setEnabled(false);
        rbCritEmb1.setEnabled(false);
        rbCritEmb2.setEnabled(false);
        comboConfCritEmb1.setEnabled(false);
        comboConfCritEmb2.setEnabled(false);
        
        // Botones de seleccionar y deseleccionar todo
        selAllNiniosButton.setEnabled(false);
        selAllEnfermedadesButton.setEnabled(false);
        selAllEmbarazadasButton.setEnabled(false);
        selNoneNiniosButton.setEnabled(false);
        selNoneEnfermedadesButton.setEnabled(false);
        selNoneEmbarazadasButton.setEnabled(false);
        
    }
    
    private void activarTodo(){
        labelConfCrit1.setEnabled(true);
        labelConfCritNinio1.setEnabled(true);
        labelConfCritNinio2.setEnabled(true);
        comboConfCritAnciano1.setEnabled(true);
        checkCritNinio1.setEnabled(true);
        checkCritNinio2.setEnabled(true);
        checkCritNinio3.setEnabled(true);
        rbCritNinio1.setEnabled(true);
        rbCritNinio2.setEnabled(true);
        botonGuardarConf.setEnabled(true);
        
        //enfermos
        checkCritEnf1.setEnabled(true);
        checkCritEnf2.setEnabled(true);
        checkCritEnf3.setEnabled(true);
        checkCritEnf4.setEnabled(true);
        checkCritEnf5.setEnabled(true);
        checkCritEnf6.setEnabled(true);
        checkCritEnf7.setEnabled(true);
        checkCritEnf8.setEnabled(true);
        checkCritEnf9.setEnabled(true);
        checkCritEnf10.setEnabled(true);
        checkCritEnf11.setEnabled(true);
        checkCritEnf12.setEnabled(true);
        checkCritEnf13.setEnabled(true);
        checkCritEnf14.setEnabled(true);
        checkCritEnf15.setEnabled(true);
        checkCritEnf16.setEnabled(true);
        checkCritEnf17.setEnabled(true);
        checkCritEnf18.setEnabled(true);
        checkCritEnf19.setEnabled(true);
        checkCritEnf20.setEnabled(true);
        checkCritEnf21.setEnabled(true);
        checkCritEnf22.setEnabled(true);
        checkCritEnf23.setEnabled(true);
        checkCritEnf24.setEnabled(true);
        checkCritEnf1.setEnabled(true); 
        labelConfCritEnf1.setEnabled(true);
        labelConfCritEnf2.setEnabled(true);
        labelConfCritEnf3.setEnabled(true);
        labelConfCritEnf4.setEnabled(true);
        labelConfCritEnf37.setEnabled(true);
        labelConfCritEnf38.setEnabled(true);
        labelConfCritEnf39.setEnabled(true);
        labelConfCritEnf40.setEnabled(true);
        labelConfCritEnf41.setEnabled(true);
        labelConfCritEnf42.setEnabled(true);
        labelConfCritEnf43.setEnabled(true);
        
        //discapacitados
        rbCritEnf1.setEnabled(true);
        rbCritEnf2.setEnabled(true);
        checkCritDis1.setEnabled(true);
        checkCritDis2.setEnabled(true);
        checkCritDis3.setEnabled(true);
        checkCritDis4.setEnabled(true);
        checkCritDis5.setEnabled(true);
        checkCritDis6.setEnabled(true);
        checkCritDis7.setEnabled(true);
        checkCritDis8.setEnabled(true);
        checkCritDis9.setEnabled(true);
        checkCritDis10.setEnabled(true);
        checkCritDis11.setEnabled(true);
        checkCritDis12.setEnabled(true);
        
        //embarazadas
        labelConfCritEmb1.setEnabled(true);
        labelConfCritEmb2.setEnabled(true);
        checkCritEmb1.setEnabled(true);
        checkCritEmb2.setEnabled(true);
        rbCritEmb1.setEnabled(true);
        rbCritEmb2.setEnabled(true);
        
        // Botones de seleccionar y deseleccionar todo
        selAllNiniosButton.setEnabled(true);
        selAllEnfermedadesButton.setEnabled(true);
        selAllEmbarazadasButton.setEnabled(true);
        selNoneNiniosButton.setEnabled(true);
        selNoneEnfermedadesButton.setEnabled(true);
        selNoneEmbarazadasButton.setEnabled(true);
    }
    
    //Radio buton configuracion de criterios predeterminado
    private void rbCrit1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCrit1ActionPerformed
        desactivarTodo();
        CriterioEnfermedad.cargarDiscapacidadPorDefecto();
        CriterioEmbarazadas.cargarEmbarazosPorDefecto();
        CriterioNinios.setDefaultEdadesSeleccionadas();
        botonNuevaConfCrit.setEnabled(false);
    }//GEN-LAST:event_rbCrit1ActionPerformed

    //Radio buton configuracion de criterios personalizados
    private void rbCrit2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCrit2ActionPerformed
        activarTodo();
    }//GEN-LAST:event_rbCrit2ActionPerformed

   
    //inicializa el vector familias segun el criterio pasado por parametro
    private void inicFamilias(CriterioAbstracto c){
        if (familias == null){
            try {
                familias = c.inicializarFamilias();
            } catch (SQLException ex) {
                Logger.getLogger(Grafica.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }
    
    //creacion de los criterios, segun los criterios de la grafica
    private void crearCriterios(GestorBD gestorBD){
       int j = 0;
       criterios = new ArrayList<String>();
       for (int i=1; i<=cantidadCrit; i++){
            JComboBox combo = (JComboBox) botones.get("cc"+i);
            //ENFERMEDAD
            if ((combo.getSelectedItem()).equals("Enfermedad")){
                crit = new CriterioEnfermedad(gestorBD);
                inicFamilias(crit);
                crit.ejecutarConsultas(familias, j);
                criterios.add("Enfermedad");
                j = j+1;
            }
            //EMBARAZADAS
            if ((combo.getSelectedItem()).equals("Embarazadas")){
                crit = new CriterioEmbarazadas(gestorBD);
                inicFamilias(crit);
                crit.ejecutarConsultas(familias, j);
                criterios.add("Embarazadas");
                j = j+1;
            }
            //NIÑOS
            if ((combo.getSelectedItem()).equals("Niños")){
                crit = new CriterioNinios(gestorBD);
                inicFamilias(crit);
                crit.ejecutarConsultas(familias, j);
                criterios.add("Niños");
                j = j+1;
            }
            //ANCIANOS
            if ((combo.getSelectedItem()).equals("Ancianos")){
                crit = new CriterioAnciano(gestorBD);
                inicFamilias(crit);
                crit.ejecutarConsultas(familias, j);
                criterios.add("Ancianos");
                j = j+1;
            }
            
            //CREACION Y CARGA DE MATRIZ
            matriz = new ArrayList();
            for (int k=1; k<=cantidadCrit; k++){
                   for (int h=1; h<k; h++){
                        JComboBox comboV = (JComboBox) botones.get("cv"+k+h);
                        matriz.add(comboV.getSelectedItem());
                   }
            }
       }
    }
    
    //muestra resultados en tabla
    private void mostrar(ArrayList<Familia> resultados, int tecnica, DefaultTableModel temp){
        for (int i=0; i<resultados.size();i++){
            Object nuevo[]= {temp.getRowCount()+1,"",""};
            temp.addRow(nuevo);
            if (tecnica != ARROW){
                float total = 0;
                for (int k=0; k<cantidadCrit;k++){
                    total = total + (resultados.get(i)).obtenerPuntaje(tecnica, k);
                }
                temp.setValueAt(total, i, 2);
            }
            temp.setValueAt(i+1, i, 0);
            temp.setValueAt((resultados.get(i)).obtenerDireccion(), i, 1);
        }
    }
    
    private void calcularRanking1(){
        if (calcularRanking.isEnabled()){
            int tecnica=0;
            if (crit == null)
                crearCriterios(gestorBD);        
           //HEURISTICA
           if (radioHeuristica1.isSelected()){         
                Heuristica heuristica = new Heuristica(matriz, familias, HEURISTICA, cantidadCrit);
                familiasResultados1 = heuristica.calcularResultados();
                tecnica = HEURISTICA;
           }
           else if (radioAHP1.isSelected()){
               //AHP
               AHP ahp = new AHP(matriz, familias, AHP, cantidadCrit);
               familiasResultados1 = ahp.calcularResultados();
               tecnica = AHP;
           }
           else if (radioOtro1.isSelected()){
               //ARROW RAYNAUD MEJORADO
               ArrowRaynaudMejorado arrRay = new ArrowRaynaudMejorado(matriz, familias, ARROW, cantidadCrit);
               familiasResultados1 = arrRay.calcularResultados();
               tecnica = ARROW;
           }
           mostrar(familiasResultados1, tecnica, tabla1);
           tecnica1 = tecnica;
       }
    }
    
    private void calcularRanking2(){
        if (calcularRanking.isEnabled()){
           int tecnica = 0;
           if (crit == null)
                crearCriterios(gestorBD);
           //HEURISTICA
           if (radioHeuristica2.isSelected()){         
                Heuristica heuristica = new Heuristica(matriz, familias, HEURISTICA, cantidadCrit);
                familiasResultados2 = heuristica.calcularResultados();
                tecnica = HEURISTICA;
           }
           else if (radioAHP2.isSelected()){
               //AHP
               AHP ahp = new AHP(matriz, familias, AHP, cantidadCrit);
               familiasResultados2 = ahp.calcularResultados();
               tecnica = AHP;
           }
           else if (radioOtro2.isSelected()){
               //ARROW RAYNAUD MEJORADO
               ArrowRaynaudMejorado arrRay = new ArrowRaynaudMejorado(matriz, familias, ARROW, cantidadCrit);
               familiasResultados2 = arrRay.calcularResultados();
               tecnica = ARROW;
           }
           mostrar(familiasResultados2, tecnica, tabla2);
           tecnica2 = tecnica;
           calcularRanking.setEnabled(false);
       }
    }
    
    //calcula el primer ranking
    private void calcularRankingMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_calcularRankingMouseClicked
       calcularRanking1();
       calcularRanking2();
       nuevaBusqueda.setEnabled(true);
    }//GEN-LAST:event_calcularRankingMouseClicked

    //guarda la configuracion del criterio niños si esta personalizado
    private void guardarConfNinios (){
        ArrayList camposDefault = CriterioNinios.getDefaultEdades();
        confCrit = new ArrayList();
        for (int i=1; i<=camposDefault.size(); i++){           
            JCheckBox check = (JCheckBox) botones.get("ccn"+i);
            if (check.isSelected()){
                confCrit.add(camposDefault.get(i-1));
            }
            if (rbCritNinio2.isSelected()){
                JComboBox combo = (JComboBox) botones.get("cccn"+i);
                String valor = String.valueOf(combo.getSelectedItem());
                Valoracion.setValoracion((String)camposDefault.get(i-1), Integer.parseInt(valor));
            }
        }
        CriterioNinios.setEdadesSeleccionadas(confCrit);
    }
    
    //guarda la configuracion del criterio enfermos si esta personalizado    
    private void guardarConfEnfermos(){
        ArrayList camposDefault = CriterioEnfermedad.obtenerEnfermedadPorDefecto();
        confCrit = new ArrayList();
        for (int i=1; i<=camposDefault.size(); i++){
            JCheckBox check = (JCheckBox) botones.get("cce"+i);
            if (check.isSelected()){
                confCrit.add(camposDefault.get(i-1));
            }
            if (rbCritEnf2.isSelected()){
                JComboBox combo = (JComboBox) botones.get("ccce"+i);
                String valor = String.valueOf(combo.getSelectedItem());
                Valoracion.setValoracion((String)camposDefault.get(i-1), Integer.parseInt(valor));
            }
        }
        CriterioEnfermedad.cambiarDetallesEnfermedad(confCrit);
    }
    
    //guarda la configuracion del criterio discapacidad si esta personalizado
    private void guardarConfDisc(){
        Enumeration<String> camposDefault = (CriterioEnfermedad.obtenerDiscapacidadPorDefecto()).keys();
        int i = 0;
        Hashtable<String,ArrayList<String>> confCrit = new Hashtable<String,ArrayList<String>>();
        while (camposDefault.hasMoreElements()){
            //agarra en este orden: nurologica, motora, fisica, psiquiatrica
            String disc = camposDefault.nextElement();
            ArrayList<String> valorSeleccionado = new ArrayList<String>();
            for (int j =1; j<CANTIDAD_GRADOS;j++){
              i = i+1;  
              JCheckBox check = (JCheckBox) botones.get("ccd"+i);
              int modulo = i % 3;
              if (check.isSelected()){
                  if (modulo==1){
                      valorSeleccionado.add("Leve (menos del 10%)");
                  }else if (modulo==2){
                      valorSeleccionado.add("Media ( del 10% al 60%)");
                  }else if (modulo==0){
                      valorSeleccionado.add("Grave ( superior al 60%)");
                  }
              }
            }
            if(!valorSeleccionado.isEmpty())
                confCrit.put(disc, valorSeleccionado);
        }
        CriterioEnfermedad.cambiarDetallesDiscapacidad(confCrit);
                
        //guarda la parte de la valoracion
        if (rbCritEnf2.isSelected()){
            ArrayList<String> disc = CriterioEnfermedad.obtenerDisc();
            int j = 0;
            for (String d:disc){
                j = j+1;
                JComboBox combo = (JComboBox) botones.get("cccd"+j);
                Valoracion.setValoracion(d, (Integer)combo.getSelectedItem());
            }
        }
    }
    
    //guarda la configuracion del criterio embarazadas si esta personalizado
    public void guardarConfEmb(){
        ArrayList camposDefault = CriterioEmbarazadas.obtenerEmbarazosPorDefecto();
        confCrit = new ArrayList();
        for (int i=1; i<=camposDefault.size(); i++){
            JCheckBox check = (JCheckBox) botones.get("ccem"+i);
            if (check.isSelected()){
                confCrit.add(camposDefault.get(i-1));
            }
            if (rbCritEmb2.isSelected()){
                JComboBox combo = (JComboBox) botones.get("cccem"+i);
                String valor = String.valueOf(combo.getSelectedItem());
                Valoracion.setValoracion((String)camposDefault.get(i-1), Integer.parseInt(valor));
            }
        }
        CriterioEmbarazadas.cambiarDetallesEmbarazos(confCrit);
    }
    
    //guardar criterios personalizados
    private void botonGuardarConfMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonGuardarConfMouseClicked
        if(verificarAdvertencia() == 0)
        {
            guardarConfNinios();    
            guardarConfEnfermos();
            guardarConfDisc();
            guardarConfEmb();
            labelMsj.setText("Configuración personalizada de criterios guardada exitosamente");
            botonGuardarConf.setEnabled(false);
            botonNuevaConfCrit.setEnabled(true);
            desactivarTodo();
        }
    }//GEN-LAST:event_botonGuardarConfMouseClicked

    //personalizacion valoracion enfermedad
    private void rbCritEnf2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCritEnf2ActionPerformed
        labelConfCritEnf5.setEnabled(true);
        labelConfCritEnf6.setEnabled(true);
        labelConfCritEnf7.setEnabled(true);
        labelConfCritEnf8.setEnabled(true);
        labelConfCritEnf9.setEnabled(true);
        labelConfCritEnf10.setEnabled(true);
        labelConfCritEnf11.setEnabled(true);
        labelConfCritEnf12.setEnabled(true);
        labelConfCritEnf13.setEnabled(true);
        labelConfCritEnf14.setEnabled(true);
        labelConfCritEnf15.setEnabled(true);
        labelConfCritEnf16.setEnabled(true);
        labelConfCritEnf17.setEnabled(true);
        labelConfCritEnf18.setEnabled(true);
        labelConfCritEnf19.setEnabled(true);
        labelConfCritEnf20.setEnabled(true);
        labelConfCritEnf21.setEnabled(true);
        labelConfCritEnf22.setEnabled(true);
        labelConfCritEnf23.setEnabled(true);
        labelConfCritEnf24.setEnabled(true);
        labelConfCritEnf25.setEnabled(true);
        labelConfCritEnf26.setEnabled(true);
        labelConfCritEnf27.setEnabled(true);
        labelConfCritEnf28.setEnabled(true);
        labelConfCritEnf29.setEnabled(true);
        labelConfCritEnf30.setEnabled(true);
        labelConfCritEnf31.setEnabled(true);
        labelConfCritEnf32.setEnabled(true);
        labelConfCritEnf33.setEnabled(true);
        labelConfCritEnf34.setEnabled(true);
        labelConfCritEnf35.setEnabled(true);
        labelConfCritEnf36.setEnabled(true);
        comboConfCritEnf1.setEnabled(true);
        comboConfCritEnf2.setEnabled(true);
        comboConfCritEnf3.setEnabled(true);
        comboConfCritEnf4.setEnabled(true);
        comboConfCritEnf5.setEnabled(true);
        comboConfCritEnf6.setEnabled(true);
        comboConfCritEnf7.setEnabled(true);
        comboConfCritEnf8.setEnabled(true);
        comboConfCritEnf9.setEnabled(true);
        comboConfCritEnf10.setEnabled(true);
        comboConfCritEnf11.setEnabled(true);
        comboConfCritEnf12.setEnabled(true);
        comboConfCritEnf13.setEnabled(true);
        comboConfCritEnf14.setEnabled(true);
        comboConfCritEnf15.setEnabled(true);
        comboConfCritEnf16.setEnabled(true);
        comboConfCritEnf17.setEnabled(true);
        comboConfCritEnf18.setEnabled(true);
        comboConfCritEnf19.setEnabled(true);
        comboConfCritEnf20.setEnabled(true);
        comboConfCritEnf21.setEnabled(true);
        comboConfCritEnf22.setEnabled(true);
        comboConfCritEnf23.setEnabled(true);
        comboConfCritEnf24.setEnabled(true);
        comboConfCritDis1.setEnabled(true);
        comboConfCritDis2.setEnabled(true);
        comboConfCritDis3.setEnabled(true);
        comboConfCritDis4.setEnabled(true);
        comboConfCritDis5.setEnabled(true);
        comboConfCritDis6.setEnabled(true);
        comboConfCritDis7.setEnabled(true);// TODO add your handling code here:
    }//GEN-LAST:event_rbCritEnf2ActionPerformed

    //valoracion predeterminada enfermedad
    private void rbCritEnf1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCritEnf1ActionPerformed
        labelConfCritEnf5.setEnabled(false);
        labelConfCritEnf6.setEnabled(false);
        labelConfCritEnf7.setEnabled(false);
        labelConfCritEnf8.setEnabled(false);
        labelConfCritEnf9.setEnabled(false);
        labelConfCritEnf10.setEnabled(false);
        labelConfCritEnf11.setEnabled(false);
        labelConfCritEnf12.setEnabled(false);
        labelConfCritEnf13.setEnabled(false);
        labelConfCritEnf14.setEnabled(false);
        labelConfCritEnf15.setEnabled(false);
        labelConfCritEnf16.setEnabled(false);
        labelConfCritEnf17.setEnabled(false);
        labelConfCritEnf18.setEnabled(false);
        labelConfCritEnf19.setEnabled(false);
        labelConfCritEnf20.setEnabled(false);
        labelConfCritEnf21.setEnabled(false);
        labelConfCritEnf22.setEnabled(false);
        labelConfCritEnf23.setEnabled(false);
        labelConfCritEnf24.setEnabled(false);
        labelConfCritEnf25.setEnabled(false);
        labelConfCritEnf26.setEnabled(false);
        labelConfCritEnf27.setEnabled(false);
        labelConfCritEnf28.setEnabled(false);
        labelConfCritEnf29.setEnabled(false);
        labelConfCritEnf30.setEnabled(false);
        labelConfCritEnf31.setEnabled(false);
        labelConfCritEnf32.setEnabled(false);
        labelConfCritEnf33.setEnabled(false);
        labelConfCritEnf34.setEnabled(false);
        labelConfCritEnf35.setEnabled(false);
        labelConfCritEnf36.setEnabled(false);
        comboConfCritEnf1.setEnabled(false);
        comboConfCritEnf2.setEnabled(false);
        comboConfCritEnf3.setEnabled(false);
        comboConfCritEnf4.setEnabled(false);
        comboConfCritEnf5.setEnabled(false);
        comboConfCritEnf6.setEnabled(false);
        comboConfCritEnf7.setEnabled(false);
        comboConfCritEnf8.setEnabled(false);
        comboConfCritEnf9.setEnabled(false);
        comboConfCritEnf10.setEnabled(false);
        comboConfCritEnf11.setEnabled(false);
        comboConfCritEnf12.setEnabled(false);
        comboConfCritEnf13.setEnabled(false);
        comboConfCritEnf14.setEnabled(false);
        comboConfCritEnf15.setEnabled(false);
        comboConfCritEnf16.setEnabled(false);
        comboConfCritEnf17.setEnabled(false);
        comboConfCritEnf18.setEnabled(false);
        comboConfCritEnf19.setEnabled(false);
        comboConfCritEnf20.setEnabled(false);
        comboConfCritEnf21.setEnabled(false);
        comboConfCritEnf22.setEnabled(false);
        comboConfCritEnf23.setEnabled(false);
        comboConfCritEnf24.setEnabled(false);
        comboConfCritDis1.setEnabled(false);
        comboConfCritDis2.setEnabled(false);
        comboConfCritDis3.setEnabled(false);
        comboConfCritDis4.setEnabled(false);
        comboConfCritDis5.setEnabled(false);
        comboConfCritDis6.setEnabled(false);
        comboConfCritDis7.setEnabled(false);
    }//GEN-LAST:event_rbCritEnf1ActionPerformed

    //personalizacion valoracion niños
    private void rbCritNinio2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCritNinio2ActionPerformed
        comboConfCritNinio1.setEnabled(true);
        comboConfCritNinio2.setEnabled(true);
        comboConfCritNinio3.setEnabled(true);
        labelConfCritNinio3.setEnabled(true);
        labelConfCritNinio4.setEnabled(true);
        labelConfCritNinio5.setEnabled(true);
    }//GEN-LAST:event_rbCritNinio2ActionPerformed

    //valoracion predeterminada niños
    private void rbCritNinio1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCritNinio1ActionPerformed
        comboConfCritNinio1.setEnabled(false);
        comboConfCritNinio2.setEnabled(false);
        comboConfCritNinio3.setEnabled(false);
        labelConfCritNinio3.setEnabled(false);
        labelConfCritNinio4.setEnabled(false);
        labelConfCritNinio5.setEnabled(false);
    }//GEN-LAST:event_rbCritNinio1ActionPerformed

    //personalizacion valoracion embarazadas
    private void rbCritEmb2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCritEmb2ActionPerformed
        labelConfCritEmb3.setEnabled(true);
        labelConfCritEmb4.setEnabled(true);
        comboConfCritEmb1.setEnabled(true);
        comboConfCritEmb2.setEnabled(true);
    }//GEN-LAST:event_rbCritEmb2ActionPerformed

    //valoracion predeterminada embarazadas
    private void rbCritEmb1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbCritEmb1ActionPerformed
        labelConfCritEmb3.setEnabled(false);
        labelConfCritEmb4.setEnabled(false);
        comboConfCritEmb1.setEnabled(false);
        comboConfCritEmb2.setEnabled(false);
    }//GEN-LAST:event_rbCritEmb1ActionPerformed

    
    //deja todo en 0 para una nueva busqueda
    private void nuevaBusquedaMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_nuevaBusquedaMouseClicked
        tabla1.setNumRows(0);
        tabla2.setNumRows(0);
        ocultarBotonesCriterios();
        cantidadCrit=1;
        crit = null;
        familias = null;
        familiasResultados1 = null;
        familiasResultados2 = null;
        calcularRanking.setEnabled(true);
        textRanking1.setText("");
        textRanking2.setText("");
        areaDatosFamilia.setText("");
        nuevaBusqueda.setEnabled(false);
    }//GEN-LAST:event_nuevaBusquedaMouseClicked

    private void tablaRanking1MouseReleased(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaRanking1MouseReleased
        // TODO add your handling code here:
    }//GEN-LAST:event_tablaRanking1MouseReleased

    private Familia encontrarFamilia(String f, ArrayList<Familia> resultados){
        
        int i = 0;
        Familia p = resultados.get(i);
        String dir = p.obtenerDireccion();
        while (!dir.equals(f)){
            i = i+1;
            p = resultados.get(i);
            dir = p.obtenerDireccion();
        }
        return p;
    }
    
    private void mostrarFamilia(String f, ArrayList<Familia> resultados){
        areaDatosFamilia.setText("");
        Familia p = encontrarFamilia(f,resultados);
        Persona individuo;
        ArrayList<Persona> integrantes = p.obtenerIntegrantes();
        String datos="";
        for (int k=0;k<integrantes.size();k++){
            individuo = integrantes.get(k);
            if(k == 0)
                datos = datos+"Nombre: "+individuo.obtenerNombre()+" (TITULAR DE LA FAMILIA) \n";
            else
                datos = datos+"Nombre: "+individuo.obtenerNombre()+"\n";
            for (int j=0; j<criterios.size(); j++){
                ArrayList<String> dat = new ArrayList<String>();
                dat = individuo.obtenerDatos(j);
                if (dat != null)
                {
                    datos = datos+criterios.get(j)+": ";
                    for (int h=0;h<dat.size();h++){
                        if (criterios.get(j).equals("Enfermedad") && dat.get(h).equals("NO"))
                            datos += "Sin obra social";
                        else if (criterios.get(j).equals("Enfermedad") && dat.get(h).equals("SI"))
                            datos += "Con obra social";
                        else
                            datos = datos + dat.get(h);
                        if (h < dat.size()-1)
                            datos += ", ";
                    }       
                    datos = datos+"\n";
                }
            }
            datos = datos+"\n";

        }
        areaDatosFamilia.setText(datos);
    }

    private void mostrarPuntajeFamilia(String f, ArrayList<Familia> resultados, int tec, JTextArea areaTexto){
        Familia p = encontrarFamilia(f,resultados);
        float total = 0;
        String puntajes="";
        for (int j=0; j<criterios.size(); j++){
            total = p.obtenerPuntaje(tec, j);
            puntajes = puntajes+criterios.get(j)+": "+total+" puntos.\n";
        }
        areaTexto.setText(puntajes);
    }
    
    private void buscarEnLaOtraTabla(String res, JTable tabla){
        tabla.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        for (int i = 0; i<tabla1.getRowCount(); i++){
            if (res.equals(tabla.getValueAt(i, 1)))
                tabla.changeSelection(i, 1, true, false);
        }
        if (tecnica1!=ARROW){
            mostrarPuntajeFamilia(res,familiasResultados1,tecnica1,textRanking1);
        }
        if (tecnica2!=ARROW){
            mostrarPuntajeFamilia(res,familiasResultados2,tecnica2,textRanking2);
        }
        mostrarFamilia(res, familiasResultados1);
    }
    
    private void tablaRanking1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaRanking1MouseClicked
        int fila = tablaRanking1.rowAtPoint(evt.getPoint());
        int col = 1;
        String res = ""+tabla1.getValueAt(fila, col);
        buscarEnLaOtraTabla(res, tablaRanking2);
    }//GEN-LAST:event_tablaRanking1MouseClicked

    private void tablaRanking2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_tablaRanking2MouseClicked
        int fila = tablaRanking2.rowAtPoint(evt.getPoint());
        int col = 1;
        String res = ""+tabla2.getValueAt(fila, col);
        buscarEnLaOtraTabla(res, tablaRanking1);
    }//GEN-LAST:event_tablaRanking2MouseClicked

    private void botonNuevaConfCritMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_botonNuevaConfCritMouseClicked
       activarTodo();
       botonNuevaConfCrit.setEnabled(false);
       botonGuardarConf.setEnabled(true);
       labelMsj.setText("");
    }//GEN-LAST:event_botonNuevaConfCritMouseClicked

    private void jButton1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton1MouseClicked
       Loguearse login = new Loguearse(this);
       login.setLocationRelativeTo(null);
       login.setVisible(true);
       this.setEnabled(false);
    }//GEN-LAST:event_jButton1MouseClicked

    public void setBD(GestorBD db)
    {
       gestorBD =  db;
       if (gestorBD.conexionExitosa()){
          textMsjConnect.setText("Se ha conectado correctamente");
          calcularRanking.setEnabled(true);
          jButton2.setEnabled(true);
          jButton1.setEnabled(false);
       }
       else 
       {
           textMsjConnect.setText("Hubo un error en la conexión");
       }
    }
    
    private void jButton2MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jButton2MouseClicked
        try {
            gestorBD.desconectar();
            textMsjConnect.setText("Se ha desconectado correctamente");
            calcularRanking.setEnabled(false);
            nuevaBusqueda.setEnabled(false);
            jButton2.setEnabled(false);
            jButton1.setEnabled(true);
        } catch (Exception ex) {
            Logger.getLogger(Grafica.class.getName()).log(Level.SEVERE, null, ex);
        }
    }//GEN-LAST:event_jButton2MouseClicked

    private void comboCriterio1MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_comboCriterio1MousePressed
        actualizarCombo(cantidadCrit);
    }//GEN-LAST:event_comboCriterio1MousePressed

    private void comboCriterio2MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_comboCriterio2MousePressed
        actualizarCombo(cantidadCrit);
    }//GEN-LAST:event_comboCriterio2MousePressed

    private void comboCriterio3MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_comboCriterio3MousePressed
        actualizarCombo(cantidadCrit);
    }//GEN-LAST:event_comboCriterio3MousePressed

    private void comboCriterio4MousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_comboCriterio4MousePressed
        actualizarCombo(cantidadCrit);
    }//GEN-LAST:event_comboCriterio4MousePressed

    private void checkCritDis5ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkCritDis5ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_checkCritDis5ActionPerformed

    private void checkCritDis9ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_checkCritDis9ActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_checkCritDis9ActionPerformed

    private void selAllNiniosButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selAllNiniosButtonMouseClicked
        changeCheckBoxOptions(true, "ccn");
    }//GEN-LAST:event_selAllNiniosButtonMouseClicked

    private void selNoneNiniosButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selNoneNiniosButtonMouseClicked
        changeCheckBoxOptions(false, "ccn");
    }//GEN-LAST:event_selNoneNiniosButtonMouseClicked

    private void selAllEnfermedadesButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selAllEnfermedadesButtonMouseClicked
        changeCheckBoxOptions(true, "cce");
        changeCheckBoxOptions(true, "ccd");
    }//GEN-LAST:event_selAllEnfermedadesButtonMouseClicked

    private void selNoneEnfermedadesButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selNoneEnfermedadesButtonMouseClicked
        changeCheckBoxOptions(false, "cce");
        changeCheckBoxOptions(false, "ccd");
    }//GEN-LAST:event_selNoneEnfermedadesButtonMouseClicked

    private void selAllEmbarazadasButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selAllEmbarazadasButtonMouseClicked
        changeCheckBoxOptions(true, "ccem");
    }//GEN-LAST:event_selAllEmbarazadasButtonMouseClicked

    private void selNoneEmbarazadasButtonMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_selNoneEmbarazadasButtonMouseClicked
        changeCheckBoxOptions(false, "ccem");
    }//GEN-LAST:event_selNoneEmbarazadasButtonMouseClicked

    private boolean areAnyCheckBoxSelected(String typeCrit)
    {
        int size = 0;
        switch(typeCrit)
        {
            case "ccn": size = CriterioNinios.getDefaultEdades().size(); break; // ninios
            case "cce": size = CriterioEnfermedad.obtenerEnfermedadPorDefecto().size(); break;  // enfermos
            case "ccd": size = getSizeDiscapacitados(); break;  // discapacitados
            case "ccem": size = CriterioEmbarazadas.obtenerEmbarazosPorDefecto().size(); break; // embarazadas
        }
        
        for (int i=1; i<= size; i++){           
            JCheckBox check = (JCheckBox) botones.get(typeCrit+i);
            if(check.isSelected())
                return false;
        }
        return true;
    }
    
    private void changeCheckBoxOptions(boolean value, String typeCrit)
    {
        int size = 0;
        switch(typeCrit)
        {
            case "ccn": size = CriterioNinios.getDefaultEdades().size(); break; // ninios
            case "cce": size = CriterioEnfermedad.obtenerEnfermedadPorDefecto().size(); break;  // enfermos
            case "ccd": size = getSizeDiscapacitados(); break;  // discapacitados
            case "ccem": size = CriterioEmbarazadas.obtenerEmbarazosPorDefecto().size(); break; // embarazadas
        }
        
        for (int i=1; i<= size; i++){           
            JCheckBox check = (JCheckBox) botones.get(typeCrit+i);
            check.setSelected(value);
        }
    }
    
    private int getSizeDiscapacitados()
    {
        int size = 0;
        Hashtable<String, ArrayList<String>> values = CriterioEnfermedad.obtenerDiscapacidadPorDefecto();
        for(Enumeration<String> a = values.keys(); a.hasMoreElements();)
        {
            String disc = a.nextElement();
            size += (values.get(disc)).size();
        }
        return size;
    }
    
    private int verificarAdvertencia()
    {
        String message = "";
        if(areAnyCheckBoxSelected("ccn"))
        {
            if(areAnyCheckBoxSelected("cce") && areAnyCheckBoxSelected("ccd"))
            {
                if(areAnyCheckBoxSelected("ccem"))
                {
                    message = "No selecciono ninguna opcion de niños, enfermedades y embarazadas";
                }
                else
                {
                    message = "No selecciono ninguna opcion de niños y enfermedades";
                }
            }
            else
            {
                if(areAnyCheckBoxSelected("ccem"))
                {
                    message = "No selecciono ninguna opcion de niños y embarazadas";
                }
                else
                {
                    message = "No selecciono ninguna opcion de niños";
                }
            }
        }
        else
        {
            if(areAnyCheckBoxSelected("cce") && areAnyCheckBoxSelected("ccd"))
            {
                if(areAnyCheckBoxSelected("ccem"))
                {
                    message = "No selecciono ninguna opcion de enfermedades y embarazadas";
                }
                else
                {
                    message = "No selecciono ninguna opcion de enfermedades";
                }
            }
            else
            {
                if(areAnyCheckBoxSelected("ccem"))
                {
                    message = "No selecciono ninguna opcion de embarazadas";
                }
            }
        }
        int opcionSel = 0;
        if(!message.equals(""))
        {
            opcionSel = 1;
            Object[] options = { "Si", "No" };
            opcionSel = JOptionPane.showOptionDialog(null, message+" ¿Desea continuar?", "Advertencia", JOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]);
        }
        return opcionSel;
    }
    
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Grafica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Grafica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Grafica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Grafica.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            @Override
            public void run() {
                new Grafica().setVisible(true);
                GestorBD gestorBD = null;
                CriterioAbstracto cn = new CriterioEnfermedad(gestorBD);
            }
        });        
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JTextArea areaDatosFamilia;
    private javax.swing.JButton botonAñadirCriterio;
    private javax.swing.JButton botonEliminarCriterio;
    private javax.swing.JButton botonGuardarConf;
    private javax.swing.JButton botonNuevaConfCrit;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.ButtonGroup buttonGroup4;
    private javax.swing.ButtonGroup buttonGroup5;
    private javax.swing.ButtonGroup buttonGroup6;
    private javax.swing.JButton calcularRanking;
    private javax.swing.JCheckBox checkCritDis1;
    private javax.swing.JCheckBox checkCritDis10;
    private javax.swing.JCheckBox checkCritDis11;
    private javax.swing.JCheckBox checkCritDis12;
    private javax.swing.JCheckBox checkCritDis2;
    private javax.swing.JCheckBox checkCritDis3;
    private javax.swing.JCheckBox checkCritDis4;
    private javax.swing.JCheckBox checkCritDis5;
    private javax.swing.JCheckBox checkCritDis6;
    private javax.swing.JCheckBox checkCritDis7;
    private javax.swing.JCheckBox checkCritDis8;
    private javax.swing.JCheckBox checkCritDis9;
    private javax.swing.JCheckBox checkCritEmb1;
    private javax.swing.JCheckBox checkCritEmb2;
    private javax.swing.JCheckBox checkCritEnf1;
    private javax.swing.JCheckBox checkCritEnf10;
    private javax.swing.JCheckBox checkCritEnf11;
    private javax.swing.JCheckBox checkCritEnf12;
    private javax.swing.JCheckBox checkCritEnf13;
    private javax.swing.JCheckBox checkCritEnf14;
    private javax.swing.JCheckBox checkCritEnf15;
    private javax.swing.JCheckBox checkCritEnf16;
    private javax.swing.JCheckBox checkCritEnf17;
    private javax.swing.JCheckBox checkCritEnf18;
    private javax.swing.JCheckBox checkCritEnf19;
    private javax.swing.JCheckBox checkCritEnf2;
    private javax.swing.JCheckBox checkCritEnf20;
    private javax.swing.JCheckBox checkCritEnf21;
    private javax.swing.JCheckBox checkCritEnf22;
    private javax.swing.JCheckBox checkCritEnf23;
    private javax.swing.JCheckBox checkCritEnf24;
    private javax.swing.JCheckBox checkCritEnf3;
    private javax.swing.JCheckBox checkCritEnf4;
    private javax.swing.JCheckBox checkCritEnf5;
    private javax.swing.JCheckBox checkCritEnf6;
    private javax.swing.JCheckBox checkCritEnf7;
    private javax.swing.JCheckBox checkCritEnf8;
    private javax.swing.JCheckBox checkCritEnf9;
    private javax.swing.JCheckBox checkCritNinio1;
    private javax.swing.JCheckBox checkCritNinio2;
    private javax.swing.JCheckBox checkCritNinio3;
    private javax.swing.JComboBox comboConfCritAnciano1;
    private javax.swing.JComboBox comboConfCritDis1;
    private javax.swing.JComboBox comboConfCritDis2;
    private javax.swing.JComboBox comboConfCritDis3;
    private javax.swing.JComboBox comboConfCritDis4;
    private javax.swing.JComboBox comboConfCritDis5;
    private javax.swing.JComboBox comboConfCritDis6;
    private javax.swing.JComboBox comboConfCritDis7;
    private javax.swing.JComboBox comboConfCritEmb1;
    private javax.swing.JComboBox comboConfCritEmb2;
    private javax.swing.JComboBox comboConfCritEnf1;
    private javax.swing.JComboBox comboConfCritEnf10;
    private javax.swing.JComboBox comboConfCritEnf11;
    private javax.swing.JComboBox comboConfCritEnf12;
    private javax.swing.JComboBox comboConfCritEnf13;
    private javax.swing.JComboBox comboConfCritEnf14;
    private javax.swing.JComboBox comboConfCritEnf15;
    private javax.swing.JComboBox comboConfCritEnf16;
    private javax.swing.JComboBox comboConfCritEnf17;
    private javax.swing.JComboBox comboConfCritEnf18;
    private javax.swing.JComboBox comboConfCritEnf19;
    private javax.swing.JComboBox comboConfCritEnf2;
    private javax.swing.JComboBox comboConfCritEnf20;
    private javax.swing.JComboBox comboConfCritEnf21;
    private javax.swing.JComboBox comboConfCritEnf22;
    private javax.swing.JComboBox comboConfCritEnf23;
    private javax.swing.JComboBox comboConfCritEnf24;
    private javax.swing.JComboBox comboConfCritEnf3;
    private javax.swing.JComboBox comboConfCritEnf4;
    private javax.swing.JComboBox comboConfCritEnf5;
    private javax.swing.JComboBox comboConfCritEnf6;
    private javax.swing.JComboBox comboConfCritEnf7;
    private javax.swing.JComboBox comboConfCritEnf8;
    private javax.swing.JComboBox comboConfCritEnf9;
    private javax.swing.JComboBox comboConfCritNinio1;
    private javax.swing.JComboBox comboConfCritNinio2;
    private javax.swing.JComboBox comboConfCritNinio3;
    private javax.swing.JComboBox comboCriterio1;
    private javax.swing.JComboBox comboCriterio2;
    private javax.swing.JComboBox comboCriterio3;
    private javax.swing.JComboBox comboCriterio4;
    private javax.swing.JComboBox comboCriterio5;
    private javax.swing.JComboBox comboValor21;
    private javax.swing.JComboBox comboValor31;
    private javax.swing.JComboBox comboValor32;
    private javax.swing.JComboBox comboValor41;
    private javax.swing.JComboBox comboValor42;
    private javax.swing.JComboBox comboValor43;
    private javax.swing.JComboBox comboValor51;
    private javax.swing.JComboBox comboValor52;
    private javax.swing.JComboBox comboValor53;
    private javax.swing.JComboBox comboValor54;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JScrollPane jScrollPane6;
    private javax.swing.JSeparator jSeparator1;
    private javax.swing.JSeparator jSeparator2;
    private javax.swing.JSeparator jSeparator4;
    private javax.swing.JSeparator jSeparator5;
    private javax.swing.JSeparator jSeparator6;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JTabbedPane jTabbedPane2;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JLabel labelConfCrit1;
    private javax.swing.JLabel labelConfCritEmb1;
    private javax.swing.JLabel labelConfCritEmb2;
    private javax.swing.JLabel labelConfCritEmb3;
    private javax.swing.JLabel labelConfCritEmb4;
    private javax.swing.JLabel labelConfCritEnf1;
    private javax.swing.JLabel labelConfCritEnf10;
    private javax.swing.JLabel labelConfCritEnf11;
    private javax.swing.JLabel labelConfCritEnf12;
    private javax.swing.JLabel labelConfCritEnf13;
    private javax.swing.JLabel labelConfCritEnf14;
    private javax.swing.JLabel labelConfCritEnf15;
    private javax.swing.JLabel labelConfCritEnf16;
    private javax.swing.JLabel labelConfCritEnf17;
    private javax.swing.JLabel labelConfCritEnf18;
    private javax.swing.JLabel labelConfCritEnf19;
    private javax.swing.JLabel labelConfCritEnf2;
    private javax.swing.JLabel labelConfCritEnf20;
    private javax.swing.JLabel labelConfCritEnf21;
    private javax.swing.JLabel labelConfCritEnf22;
    private javax.swing.JLabel labelConfCritEnf23;
    private javax.swing.JLabel labelConfCritEnf24;
    private javax.swing.JLabel labelConfCritEnf25;
    private javax.swing.JLabel labelConfCritEnf26;
    private javax.swing.JLabel labelConfCritEnf27;
    private javax.swing.JLabel labelConfCritEnf28;
    private javax.swing.JLabel labelConfCritEnf29;
    private javax.swing.JLabel labelConfCritEnf3;
    private javax.swing.JLabel labelConfCritEnf30;
    private javax.swing.JLabel labelConfCritEnf31;
    private javax.swing.JLabel labelConfCritEnf32;
    private javax.swing.JLabel labelConfCritEnf33;
    private javax.swing.JLabel labelConfCritEnf34;
    private javax.swing.JLabel labelConfCritEnf35;
    private javax.swing.JLabel labelConfCritEnf36;
    private javax.swing.JLabel labelConfCritEnf37;
    private javax.swing.JLabel labelConfCritEnf38;
    private javax.swing.JLabel labelConfCritEnf39;
    private javax.swing.JLabel labelConfCritEnf4;
    private javax.swing.JLabel labelConfCritEnf40;
    private javax.swing.JLabel labelConfCritEnf41;
    private javax.swing.JLabel labelConfCritEnf42;
    private javax.swing.JLabel labelConfCritEnf43;
    private javax.swing.JLabel labelConfCritEnf5;
    private javax.swing.JLabel labelConfCritEnf6;
    private javax.swing.JLabel labelConfCritEnf7;
    private javax.swing.JLabel labelConfCritEnf8;
    private javax.swing.JLabel labelConfCritEnf9;
    private javax.swing.JLabel labelConfCritNinio1;
    private javax.swing.JLabel labelConfCritNinio2;
    private javax.swing.JLabel labelConfCritNinio3;
    private javax.swing.JLabel labelConfCritNinio4;
    private javax.swing.JLabel labelConfCritNinio5;
    private javax.swing.JLabel labelCriterio2;
    private javax.swing.JLabel labelCriterio21;
    private javax.swing.JLabel labelCriterio3;
    private javax.swing.JLabel labelCriterio31;
    private javax.swing.JLabel labelCriterio32;
    private javax.swing.JLabel labelCriterio4;
    private javax.swing.JLabel labelCriterio41;
    private javax.swing.JLabel labelCriterio42;
    private javax.swing.JLabel labelCriterio43;
    private javax.swing.JLabel labelCriterio5;
    private javax.swing.JLabel labelCriterio51;
    private javax.swing.JLabel labelCriterio52;
    private javax.swing.JLabel labelCriterio53;
    private javax.swing.JLabel labelCriterio54;
    private javax.swing.JLabel labelMensaje;
    private javax.swing.JLabel labelMsj;
    private javax.swing.JButton nuevaBusqueda;
    private javax.swing.JRadioButton radioAHP1;
    private javax.swing.JRadioButton radioAHP2;
    private javax.swing.JRadioButton radioHeuristica1;
    private javax.swing.JRadioButton radioHeuristica2;
    private javax.swing.JRadioButton radioOtro1;
    private javax.swing.JRadioButton radioOtro2;
    private javax.swing.JRadioButton rbCrit1;
    private javax.swing.JRadioButton rbCrit2;
    private javax.swing.JRadioButton rbCritEmb1;
    private javax.swing.JRadioButton rbCritEmb2;
    private javax.swing.JRadioButton rbCritEnf1;
    private javax.swing.JRadioButton rbCritEnf2;
    private javax.swing.JRadioButton rbCritNinio1;
    private javax.swing.JRadioButton rbCritNinio2;
    private javax.swing.JButton selAllEmbarazadasButton;
    private javax.swing.JButton selAllEnfermedadesButton;
    private javax.swing.JButton selAllNiniosButton;
    private javax.swing.JButton selNoneEmbarazadasButton;
    private javax.swing.JButton selNoneEnfermedadesButton;
    private javax.swing.JButton selNoneNiniosButton;
    private javax.swing.JTable tablaRanking1;
    private javax.swing.JTable tablaRanking2;
    private javax.swing.JTextField textMsjConnect;
    private javax.swing.JTextArea textRanking1;
    private javax.swing.JTextArea textRanking2;
    // End of variables declaration//GEN-END:variables
}
